Crontab [TechTrav Wiki]

Site Tools


Sidebar

unix_based.jpg

tech:unix:crontab

This is an old revision of the document!


Crontab

Difficulty
Very easy
If you're from Windows World, crontab is Unix's Task Scheduler, only it's better.

On macOS, you can install a crontab for your local user by running the following (using the nano editor)

USER
env EDITOR=nano crontab -e

On the first line, you can then enter the command you want to run and how long to run it.

''* * * * *  command to execute
│ │ │ │ │
│ │ │ │ └─── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
│ │ │ └──────── month (1 - 12)
│ │ └───────────── day of month (1 - 31)
│ └────────────────── hour (0 - 23)
└─────────────────────── min (0 - 59)''
tech/unix/crontab.1593797624.txt.gz · Last modified: 2020/07/30 00:06 (external edit)

technology is not a panacea