I have a cronjob that does not execute when scheduling.
If my counting is right, then you scheduled 3 separate scripts, not just 1.
How do you know they are not executed?
Have you located the relevant entries in the logfile /var/log/syslog? What does syslog tell you about your 3 scripts?
Maybe they are launched by cron as designed, but fail to complete due to an error?
Have you added some internal logging functionality to your scripts so that they log their own actions to dedicated logfiles perhaps?
When scheduling the 3 scripts to run each Saturday and Sunday morning at 7:54, 7:55 and 7:56 respectively, have you kept in mind that they will not be run in case the machine is not switched on at the specified time? (This thought will be irrelvant provided your machine runs 24 hours a day.)
3-) Notice the empty remark at the end, I read somewhere that it takes an empty line at the end.
As far as I know cron does not care about comment lines. There should be no need of having a trailing comment line. But maybe a particular cron version had a bug which made it ignore the last crontab line unless it was ended by a proper linefeed?
Where in the logs can I see if cron returns an error ?
/var/log/syslog should hold entries about all cron activities.
A very simple way of making your 3 scripts create their own logfiles which should hold all error messages as well would be changing your crontab lines look like this:
- Code: Select all
54 7 * * 0,6 /home/patrick/Scripts/script01 > /home/patrick/Scripts/script01.log 2>&1
55 7 * * 0,6 /home/patrick/Scripts/script02 > /home/patrick/Scripts/script02.log 2>&1
56 7 * * 0,6 /home/patrick/Scripts/script03 > /home/patrick/Scripts/script03.log 2>&1