Difference between revisions of "HowTo - cron"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
(Created page with "'''cron''' is a background process (a daemon) that wakes up every minute & checks '''crontab''' files for tasks to run. These files might belong to '''root''' or to individual user accounts on the machine. =The crontab file= For details about how to create crontab entries, see: *<code>man 5 crontab</code> *[https://community.linuxmint.com/tutorial/view/1072 Crontab Syntax Tutorial] ==Editing your personal crontab file:== *<code>crontab -e</code> ==Editing the root c...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''cron''' is a background process (a daemon) that wakes up every minute & checks '''crontab''' files for tasks to run. These files might belong to '''root''' or to individual user accounts on the machine.
'''cron''' is a background process (a [[Linux - daemon|daemon]]) that wakes up every minute & checks '''crontab''' files for tasks to run. These files might belong to '''[[Linux - root|root]]''' or to individual user accounts on the machine.


=The crontab file=
=The crontab file=
Line 25: Line 25:


*<code>grep CRON /var/log/syslog</code>
*<code>grep CRON /var/log/syslog</code>
[[Category:Linux]]
[[Category:LinuxTools]]

Latest revision as of 15:28, 3 January 2022

cron is a background process (a daemon) that wakes up every minute & checks crontab files for tasks to run. These files might belong to root or to individual user accounts on the machine.

The crontab file

For details about how to create crontab entries, see:

Editing your personal crontab file:

  • crontab -e

Editing the root crontab file:

  • sudo crontab -e

starting/stopping/restarting

  • sudo service cron start
  • sudo service cron stop
  • sudo service cron restart

logs

cron logs are rolled into syslog

  • grep CRON /var/log/syslog