Questions tagged [cron]

Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.

Filter by
Sorted by
Tagged with
0 votes
2 answers
37 views

How to make timeout(1) behave in cron like it behaves in interactive shell

Running this command in an interactive bash: $ timeout 1 sleep 2; echo $? 124 returns 124 after 1 second, as expected and as documented in timeout(1). However, if I run the same as a cron job, or if ...
-1 votes
2 answers
27 views

mailx Set Name of Attached File

I have a cron job, whose output I send to mailx: # Monday morning at midnight; "mail" is symlink to "mailx" 00 00 * * mon python3 script-with-7500line-output.py | mailx -S 'from=...
0 votes
3 answers
64 views

Crontab not working as expected [duplicate]

Dears, i configured script in crontab to run every 10 minutes and its not working at all. I dont see any entry in configured log path (/var/log/cron) "*/10 * * * * example_script.sh" ...
  • 11
0 votes
1 answer
23 views

CRON Job to delete files (not folders) with specific extensions within a folder and subfolders

I need a cron job that will delete all files with these extensions (.jpg, .jpeg, .png, .pdf) in a folder (including files in subfolders, but not the subfolders themselves) twice a day. I'm using ...
0 votes
0 answers
39 views

GAWK not running in crontab

I have the below script running successfully manually. But when it is executed in crontab (below), I dont see anything happening. Script #!/usr/bin/gawk -f #!/bin/bash PATH=/usr/local/bin:/usr/bin #...
1 vote
0 answers
34 views

Cron not working after pam customization to check groups

I need help with a PAM configuration. I've a Debian 11.5 machine with kerberos connected to an MS AD server. I want to configure the machine in order to allow some AD user to login, filtering them by ...
0 votes
1 answer
38 views

What time is used when I set crontab @daily?

What time is used by crontab when I use the option @daily? Where is this information stored on Debian/Gnome? And how can I change this time value?
0 votes
1 answer
27 views

Alternative to incron in Photon OS

I'm setting up a server with Photon OS. I need to get a notification everytime a file is modified. I used incrontab in former Ubuntu Server setups, but this utility is not available in Photon OS ...
  • 113
0 votes
1 answer
56 views

Using Crontab to run a shell script with SSH

I’m trying to use a cronjob to run a shell script on my EC2 instance, which SSH’s to a server to get a mongodump of a database and restore at a given specific time without me having to login. I’ve ...
1 vote
1 answer
21 views

Crond Inactive Every Other Minute

I have a problem with crond (dated 13Feb21) on my Slackware 14.2 x86_64 (Linux version 5.12.10) server. I have a script that crond runs every minute that accesses an external device for current data ...
  • 11
1 vote
1 answer
42 views

CRON not sending output to email, but writing output /var/log/cron

I have a Rocky 8.5 server. Initial settings in Cron as follows (same as our other servers, which work fine forwarding cron output emails) HOSTNAME=xxxx CVS_RSH=ssh MAILTO=yyyy@zzzz 35 * * * * /usr/...
  • 123
0 votes
0 answers
22 views

banning IPs from file in Fail2ban

I've installed fail2ban and it's working fine in banning IPs that try to access ssh with invalid username/password even if they tried once. Now I'm receiving key exchange attacks that fail2ban doesn't ...
  • 3
0 votes
0 answers
23 views

php artisan schedule:run running twice by root and ubuntu user?

we are having a problem that kernel commands running twice. I checked if the schedule runs the command and if it exists more than once. I check with this command ps aux | grep "artisan schedule:...
0 votes
0 answers
28 views

Debian 10: user cron does not runl; cron[xxx]: Permission denied

all. Weird errors when trying to run cron on a Deb10 instance. Root is the only user that succeeds in cron. I've tested a simple called to logger and a script that sends an email. No errors running ...
  • 157
0 votes
0 answers
21 views

Use EasyCron to make cURL request with cronjob

I want to make a cURL request every 12 hours and trigger the request with a cronjob. Unfortunately I'm a total newbie in cURL and cronjobs. This is the request I want to make: curl --location --...
  • 101
0 votes
1 answer
24 views

Move Services From Servers in Aws

Could anyone advise the best method(s) to move service from one EC2 instance to another? For example Test-dev we want to spin up and replace with TEST (server) but we want to get CRON services and ...
0 votes
2 answers
47 views

How do i run a cronjob every 100 days

What would a crontab syntax look like for a command to run every 100 days? I need to run a reboot every 100 days
  • 3
1 vote
1 answer
50 views

start-stop-daemon: command not found . This error only occurs at boot time in a cron job

I have scheduled an @reboot cron job to start a service in /etc/init.d After boot, service is not started when I reach shell command line. The contents of /var/log/cron show the following, 2022-09-...
2 votes
1 answer
39 views

How to change the default email address for the non-root user in postfix?

I have a user called admin (not root) and have setup everything under that user's account. I have also crontab that is meant to run a bash script at a certain time in the day. For some reason the ...
  • 1,425
-1 votes
2 answers
30 views

Crontab query - won't execute program [duplicate]

Noob question. I have an executable file saved here: /home/pi/auroramon-1.07/src/auroramon When I enter /home/pi/auroramon-1.07/src/auroramon in the command line the program runs. I created a crontab ...
  • 1
1 vote
1 answer
40 views

What is supposed to happen to running cron processes after modifying them with crontab -e?

So here's the situation: I start a program @reboot with Cron (OS is Debian 11). This program keeps performing tasks unless it encounters an illegal state. I change the CLI variables for this program ...
0 votes
3 answers
250 views

Crontab not found in docker image

I have a docker image set up by another person, and it doesn't seem to have cron installed. When I tried to run crontab -l (be it as a root or non-root user), it says command not found. But I do see /...
  • 211
0 votes
0 answers
22 views

gio operation not supported in a cron task [duplicate]

I have a task (script) that I added via crontab -e (Ubuntu 20.04). The task uses gio to copy a file in /tmp (that was created a line before in the script) to Google Drive. Running the gio command in a ...
  • 1,057
0 votes
1 answer
27 views

Hosting resource intensive PHP cron jobs

My website is currently running on a VPS. To make the site work, I have a number of resource intensive cron jobs - and when they are running, my site stop responding/becomes incredible slow. I'm ...
  • 1
1 vote
1 answer
66 views

How to monitor scripts executed via cron and perform action on elapsed times?

I run numerous scripts via CRON throughout the day, and as they rely on third-party providers which sometimes are slow, I currently run them like so timeout 60m bash /script.sh and that's worked great ...
  • 11
0 votes
2 answers
41 views

Duplicity Macos crontab (python errors )

I am having errors while running duplicity in macOS (crontab) The duplicity command is as follows (works in Command-line) /usr/local/bin/duplicity /Users/myname/go file:///Volumes/EVO840\ -\ IMPORTANT/...
-1 votes
2 answers
523 views

Cron job to backup the MySQL database produces empty dump files with no errors logged that I can find

My site is controlled via cpanel. I want to automate the backup of my databases and then automate their download to my development machine. The first step was to set up the cron jobs as follows 0 3 ...
0 votes
1 answer
22 views

Scheduling Multiple Cron Jobs for a REST API connector in Fivetran

We use a Fivetran connector that pulls our data every five minutes. We do not need the data pulled that frequently during non working hours. The connector we have does not allow for customization, but ...
0 votes
0 answers
49 views

Why the letsencrypt certficate validity ended before the expiry date

I configured the letsencrypt certificate for my website which is hosted on centos 7 with httpd web server On 12-07-22 I renewed the SSL certificate manually by using /usr/bin/certbot renew. Then ...
0 votes
0 answers
121 views

rsync - exclude error messages

I use rsync with --log-file option in crontab. How can I exclude error messages from the rsync_out.log file? $ rsync -ahW ./test.txt /media/nas/mycloudex2ultra/ --log-file=rsync_out.log rsync: [sender]...
  • 1
0 votes
0 answers
27 views

Crontab creates multiple python PIDs which leading to crashing server [duplicate]

I am executing python script on linux server, and it works perfectly if started manually. It downloads data from SQL server, adds new columns, saves, and loads. It executes one function after another. ...
0 votes
0 answers
265 views

Why had the process being killed in cron, but when in works fine if started manually?

I have a python script which usually executes for about 25 minutes locally or at Ubuntu server I start it by command: python3 /home/mluser/Model_building/main.py The process executes fine. But whe I ...
0 votes
0 answers
58 views

How to rsync files/folder from some days ago?

I would like to run cron job that run rsync command to copy files from 3-4 days ago, I've already try some rsync command like this: rsync -arogzv --ignore-existing --files-from=<(find . -type f,d -...
0 votes
0 answers
33 views

Connecting a CronJob service to a service mesh when no ports are exposed

I am fairly new to Kubernetes and currently working on a project where I am trying to add a CronJob deployment service to our Kubernetes service mesh. My current deployment and Cronjob does not expose ...
  • 1
0 votes
1 answer
65 views

Why timezone setting in crontab has no effect on schedule?

I've configured my timezone on server with timedatectl, e.g.: timedatectl set-timezone Europe/Budapest I've put timezone settings to my crontab configuration like these: CRON_TZ=America/Cancun 0 12 * ...
  • 173
2 votes
1 answer
250 views

Cannot add cron task

I'm trying to add cron task to renew my certbot certificates everytime they are going to expire, but I can't seem to be able to do that. I used this command: crontab -e 0 12 * * * /usr/bin/certbot ...
  • 131
0 votes
0 answers
56 views

Monitoring tool for remote borg repository

I am currently using Borg Backup which is connected to a remote repository hosted in Hetzner. Borg is being run daily via cron. While I place some log files to see if backup is working, I would like ...
1 vote
1 answer
38 views

Odd process appearing about every 18-20 minutes that runs 'apt-get --just-print dist-upgrade'

Got this process running on a 4 core Virtual Machine server running Debian 11 that pops up about every 20 minutes: /usr/bin/apt-get --just-print dist-upgrade ...and I'd like to stop it as this VM ...
0 votes
0 answers
13 views

Simple crontab script on works [duplicate]

The following crontab entry doesn't work: * * * * if pgrep wine || pgrep -f minecraft; then systemctl stop nbminer; else systemctl start nbminer; fi But if I put the exact command in a bash script ...
  • 187
0 votes
1 answer
98 views

Difficulty running crontab startup script

I have the following crontab job to run on reboot: PATH=/snap/bin:/usr/bin @reboot run_me_startup.sh >> $HOME/startup_run_log.txt 2>&1 My docker install has placed the files in /snap/bin ...
  • 101
0 votes
0 answers
434 views

cronjob not running on Ubuntu server, same scripts under cron work on Debian?

I've recently configured a new Ubuntu 22.04 server for a project I'm working on, which replaces a Debian 7 server which I initially used. The project runs mostly PHP scripts that are run at specific ...
1 vote
1 answer
802 views

Why does docker-compose issue the "wrong" exit code when errors occur?

I created a bash script to automate a borg backup of a running docker container. Before the backup is started, the container should be paused. The script should be executed only after the container ...
  • 13
0 votes
0 answers
142 views

Can run daily logrotate without cron?

On my docker, i use amazonlinux:2 at this default enviroment not install cron. I want to use logrotate for rotating log of application every daily. Can Logrotate work automatic without cron? This file ...
0 votes
1 answer
35 views

MAILTO not adding mails to queue until 9pm

I'm using postfix on CentOS to send out mails from crontab (using MAILTO=). The mails do send, but only at 21:01, regardless of the time that the cronjob ran. If I run multiple jobs, all of the mails ...
0 votes
1 answer
128 views

Kubernetes Pods Getting in Pending State Forever

We have a CronJob which will run every 'x' minutes. For each and every Schedule, A Pod will be Scheduled and it runs and it is doing its job. Now, After 2-3 days, The Pod is getting into Pending State ...
0 votes
1 answer
37 views

Two identical Debian boxes, only one delivers cron output in /var/mail

I have two Debian 11 boxes with cron and postfix installed. Both seem to have the exact same config (but probably not) and one of them does deliver cron output to the correct /var/mail/user file and ...
0 votes
1 answer
469 views

Cron Docker container not rebooting properly after unattended upgrades

Disclaimer, I have very little experience with Docker and servers in general. Most of the server-related things I do by following manuals created by former employees and a lot of Googling. We are ...
0 votes
1 answer
18 views

Which process/script/application if squeezing my files every 5 minutes?

I have a process executing every 5 minutes (precisely) which overwrites the content of a folder. It obviously synchronizes whith another (identified) folder, which means it completely replaces the ...
0 votes
1 answer
174 views

shutdown and systemd service

At 5am cron runs shutdown, systemd executed /home/myuser/bin/mailme-shutdown.sh and my pc poweroff. When I startup the pc an email coming to me. The email is the script (mailme-shutodown.sh) executed ...
  • 1,055
0 votes
1 answer
565 views

Aggregate multiple log files in a directory

I have k3s single node cluster running on a machine. I do not have any logging infrastructure set up yet and I'd leave this as a future learning experience for now. On that k3s I run some cron jobs ...
  • 156

1
2 3 4 5
39