Cron Jobs



# Cron Jobs
### A Quick How To Reference

Cron is used for scheduling repetitive tasks, such as backing up your system once a day, or changing your wallpaper with a new random image every 10 minutes.

You put the commands you want to execute into a text file, save it, and then make that text file executable.

Then you add a line to the crontab file by typing "crontab -e" into a terminal, and adding a line to schedule that script file using the syntax below:

<br># ┌─minute(0-59)<br># │ ┌─hour(0-23)<br># │ │ ┌─dayOfMonth<br># │ │ │ (1 - 31)<br># │ │ │ ┌─month(1-12)<br># │ │ │ │ ┌─dayOfWeek<br># │ │ │ │ │ (0 - 6)<br># │ │ │ │ │ (SunToSat; <br># │ │ │ │ │ 7 is also<br># │ │ │ │ │ SunOnSome<br># │ │ │ │ │ systems)<br># │ │ │ │ │<br> * * * * * <command to execute><br>

- "" means every single one
- "
/10" means every 10
- "*/5" means every 5

So if you put */5 in the minutes place, it means every 5 minutes.

For more info go to Linux Handbook and KVZ.IO.

See comments for some examples.

⚡️ Follow Freedom Tech

#CronJobs #Crontab #Linux #GreedomTech