Cron jobs are an essential part of any Linux system. They allow you to schedule tasks to be run automatically at a specified time or interval. We have listed numerous cron job examples of cron jobs on this page that don’t fit into our other cron categories.
Why Might You Want to Run a Cron Job?
There are many reasons why you might want to run a cron job. For example, you might want to automatically back up your website files every night or send out a weekly email newsletter.
Cron is especially useful for tasks that must be performed regularly, such as checking for new software updates or cleaning up temporary files.
Here are some examples of cron jobs/crontabs:
Miscellaneous Cron Jobs
These cron jobs don’t fit into any of the categories above, but you might find them super-useful!
- Every uneven minute: 1-59/2 * * * *
- Every morning: 0 8 * * *
- Every day/night at midnight: 0 0 * * *
- Every weekday: 0 0 * * 1-5
- Every weekend: 0 0 * * 6,0
- Every quarter: 0 0 1 */3 *
- Every year: 0 0 1 1 *
The examples above should have helped you to set up some cron jobs.
Remember to check out our main cron jobs cheat sheet and if you are looking to set up a cron job to run every few minutes, hours, days, weekdays, or months, then be sure to check out our relevant sections.
We hope you found some of the crontab examples we’ve listed above helpful. Feel free to let us know if there are any additional examples you’d like to see on this page.