You are not logged in.
Pages: 1
Hi,
on my new Arch install I have a stupid problem with cronie:
I want to run a backup script at 03:00am each day of each week of each month and my crontab therefore looks like this;
$ crontab -e
MAILTO=me@work.com
* 3 * * * /path/to/my/backup/script.sh 2>&1 | /usr/bin/logger -t BACKUPWhat is happening is, that this job indeed fires at 03:00 - but from then on it is repeated every minute until 04:00 spamming my machine with rsyncs and mail reports.
syslog:
Jun 14 02:01:01 CROND[2607]: (root) CMD (run-parts /etc/cron.hourly)
Jun 14 03:00:01 CROND[2802]: (me) CMD (/path/to/my/backup/script.sh)
Jun 14 03:01:01 CROND[2825]: (me) CMD (/path/to/my/backup/script.sh)
Jun 14 03:02:01 CROND[2840]: (me) CMD (/path/to/my/backup/script.sh)
...56 MORE...
Jun 14 03:59:01 CROND[3761]: (me) CMD (/path/to/my/backup/script.sh)
Jun 14 04:01:01 CROND[3773]: (root) CMD (run-parts /etc/cron.hourly)Anything obvious I am doing wrong?
best,
MoA
Last edited by masterofamn (2017-06-14 07:48:28)
Offline
Paste your backup script.
Offline
Hi,
What is happening is, that this job indeed fires at 03:00 - but from then on it is repeated every minute until 04:00 spamming my machine with rsyncs and mail reports.
This is, because you have defined this exactly in your cronjob: hour=3 + minute=all=*
change it to e.g.
13 3 * * *to start it only once at 03:13 every day.
The sytax is "minute hour day_of_month month day_of_week command" - see the wiki https://wiki.archlinux.org/index.php/Cron
Last edited by ua4000 (2017-06-14 07:22:13)
Offline
head->desk
thanks @ua4000.
Offline
Pages: 1