Difference between revisions of "Cron"

From IPLOG
Jump to: navigation, search
(Created page with "=== Operation === If '''crond''' run, it evaluates its configuration in '''/var/spool/cron/crontabs/root''' at each minute at :00 seconds. To start/stop/restart '''crond''' a...")
 
(No difference)

Latest revision as of 12:48, 20 January 2022

Operation

If crond run, it evaluates its configuration in /var/spool/cron/crontabs/root at each minute at :00 seconds.

To start/stop/restart crond and rewrite configuration (on start) from /etc/crontabs/root you can use startscript:

/etc/init.d/S??crond (start|stop|restart)

Configuration

Temporary

vi /var/spool/cron/crontabs/root

or

crontab -l #list
crontab -e #edit
crontab -r #delete

Permanent

vi /etc/crontabs/root

or

crontab -c /etc/crontabs -l #list
crontab -c /etc/crontabs -e #edit
crontab -c /etc/crontabs -r #delete

and reload

/etc/init.d/S??crond restart

Syntax

* * * * * /path/to/command/to/run

https://crontab.guru/