Belajar Sendiri

Commands

crontab

crontab <file> | crontab -l | crontab -r

Risk: Careful

What it does

Installs or shows your roster of scheduled jobs.

When to use it

To run a script at set times, like 2 a.m. every night.

Example

$ crontab jobs.txt

Install the roster from a file. It replaces the old one.

$ crontab -l

Show your roster.

$ echo '0 2 * * * /home/you/backup.sh' | crontab -

Install one line from the pipe.

$ crontab -r

Delete your whole roster, without asking.