
# 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:
```
# ┌─minute(0-59)
# │ ┌─hour(0-23)
# │ │ ┌─dayOfMonth
# │ │ │ (1 - 31)
# │ │ │ ┌─month(1-12)
# │ │ │ │ ┌─dayOfWeek
# │ │ │ │ │ (0 - 6)
# │ │ │ │ │ (SunToSat;
# │ │ │ │ │ 7 is also
# │ │ │ │ │ SunOnSome
# │ │ │ │ │ systems)
# │ │ │ │ │
* * * * *
```
- "*" 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](https://linuxhandbook.com/crontab) and [KVZ.IO](https://kvz.io/schedule-tasks-on-linux-using-crontab.html).
See comments for some examples.
[⚡️ Follow Freedom Tech](https://nostr.at/npub1fkluklzamwpyn7w8awxzrcqe7z8mldlvthk4gz9kz3vsh6udz62s9qj48l)
#CronJobs #Crontab #Linux #GreedomTech
