Crontab is a job scheduling tool included with the Linux system pack. The first five elements relate to the execution date and time and are used to specify the frequency of the task execution.
A crontab file has the following fields in the following order:
minute(s) hour(s) day(s) month(s) weekday(s) command(s)
0 4 * * * sh /home/ec2-someuser/someScript.sh
This means the script “someScript.sh” file is to be executed every day at 4AM.
5 4 * * * sh /home/ec2-someuser/someScript.sh
This means the script “someScript.sh” file is to be executed every day at 4:05AM.
30 * * * * sh /home/ec2-someuser/someaction.sh
This instructs the script “someaction.sh” file to run every day and every 30 minutes.
30 23 * * * sh /home/ec2-someuser/someaction.sh
This implies that every night at 23:30, the script file “someaction.sh” is to be executed.
1 1 1 1 1 sh /home/ec2-someuser/someaction.sh
This means the script “someaction.sh” file is to be executed- “at 01:01 on day-of-month 1 and on Monday in January.”
Hope you find this article helpful.