Difference between revisions of "HowTo - cron"

From The TinkerNet Wiki
Jump to navigation Jump to search
(Created page with "== The crontab file == Editing your personal crontab file: * <code>crontab -e</code> Editing the root crontab file: * <code>sudo crontab -e</code> For details about how to...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== The crontab file ==
+
<span style="background-color: rgb(153, 204, 0); color: rgb(0, 0, 255);" data-mce-style="background-color: #99cc00; color: #0000ff;">'''<big>Now on Wiki.NerdMage.Ca</big>'''</span>
 +
 
 +
==The crontab file==
 
Editing your personal crontab file:
 
Editing your personal crontab file:
  
* <code>crontab -e</code>
+
*<code>crontab -e</code>
  
 
Editing the root crontab file:
 
Editing the root crontab file:
  
* <code>sudo crontab -e</code>
+
*<code>sudo crontab -e</code>
  
 
For details about how to create crontab entries, see:
 
For details about how to create crontab entries, see:
  
* <code>man 5 crontab</code>
+
*<code>man 5 crontab</code>
 +
*[https://community.linuxmint.com/tutorial/view/1072 Crontab Syntax Tutorial]
  
== starting/stopping/restarting ==
+
==starting/stopping/restarting==
  
* <code>sudo service cron start</code>
+
*<code>sudo service cron start</code>
* <code>sudo service cron stop</code>
+
*<code>sudo service cron stop</code>
* <code>sudo service cron restart</code>
+
*<code>sudo service cron restart</code>
  
== logs ==
+
==logs==
 
cron logs are rolled into syslog
 
cron logs are rolled into syslog
  
* <code>grep CRON /var/log/syslog</code>
+
*<code>grep CRON /var/log/syslog</code>

Latest revision as of 00:58, 27 December 2021

Now on Wiki.NerdMage.Ca

The crontab file

Editing your personal crontab file:

  • crontab -e

Editing the root crontab file:

  • sudo crontab -e

For details about how to create crontab entries, see:

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