Sample Header Ad - 728x90

When scheduling jobs to be run by crontab, should leading zeros be used for the hour?

5 votes
2 answers
4718 views
Let's assume that I want to run a shell script named test.sh at 1 AM every day. I could either use: 0 1 * * * /home/user/test.sh Or I could use: 0 01 * * * /home/user/test.sh For the above example, which is technically the correct answer - should a leading 0 be used in the shedule, or should just the number of the hour be entered?
Asked by elliott94 (153 rep)
Apr 11, 2020, 07:42 PM
Last activity: Jul 6, 2024, 04:43 PM