cron not executing a script
Hello, I have been working with Linux for several years and this is a first for me. For some reason cron is not executing a script for me.
I have been editing the crontab via the command "crontab -e" as the root user. crontab: Code:
SHELL=/bin/bash I have verified that crond is running: Code:
# ps -aux | grep cron Code:
# systemctl status crond Any help would be appreciated. |
Code:
ls -al /backup2/kiska.rsync-incremental-backup.sh |
Yes the code starts with #!/bin/bash
and: Code:
# ls -al /backup2/kiska.rsync-incremental-backup.sh |
what do the /var/log/* files "say" if anything happened?
Code:
grep -i backup /var/log/* -R Does it run manually? absolute /path/to/rsync in kiska.rsync-incremental-backup.sh ? Just thinking out loud... |
When you used crontab -e you edited the root user crontab. It is root's, but it is still a user's crontab. In a user's crontab you cannot specify the user for which the crontab has to run. So it seems the line is an invalid syntax.
If you want to run a job with the user specified, you have to use /etc/crontab. This file is edited directly, and cron detects any changes. I think this /etc/crontab is the preferred way for system-wide jobs. Unless you set some options somewhere, cron does not report syntax failures but dies silently. jlinkels |
All times are GMT -5. The time now is 11:44 AM. |