$ crontab -e
Press i
Enter your cronjob entries per line. Cron expression:
Cron Expression Examples:
* * * * * // Run every minute. ex: for 5 mins => */5 * * * *
0 * * * * // Run on the hour, every hour ex: every 2hrs => * */2 * * *
0 23 * * * // Run at 11 p.m. every day
0 0,12 * * 6 // Run at midnight and midday every Saturday
30 2 */2 * * // Run every second day at 2.30 a.m.
5 stars are explained below:*
1st star: Minute (ranges from 0-59)
2nd star: Hour (ranges from 0-23)
3rd star: Day (ranges from 1-31)
4th star: Month(ranges from 1-12)
5th star: Day-of-week (0-7. 0 & 7 is Sun. 1-Mon, 2-Tue...etc)
Example cronjob looks like:
0 23 * * * curl --silent https://yourdomain.com/cronjob.php
Press ESC
Exit and save the vi editor
Press ZZ (shift+zz)