List crontab

# crontab -l [username]

   

Edit(Create) crontab

$ crontab -e [username]


Remove crontab

$ crontab -r [username]


Listup crontab files

$ ls -l /var/spool/cron/crontabs


Initialize crontab editor

# rm -f ~/.selected_editor (Ubuntu)


Check cronbab is running

# ps -ef | grep crond

root     53477 53445  0 06:35 pts/2    00:00:00 grep --color=auto crond


# grep CRON /var/log/syslog


Editing Crontab 

# vi /etc/crontab


  SHELL=/bin/bash

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  MAILTO=root

  HOME=/


  # For details see man 4 crontabs


  # Example of job definition:


  # .---------------- minute (0 - 59)

  # |  .------------- hour (0 - 23)

  # |  |  .---------- day of month (1 - 31)

  # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...

  # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

  # |  |  |  |  |

  # *  *  *  *  * user-name command to be executed

 45,5 10 *  *  1-5 root /usr/bin/rdate -s time.bora.net && clock -w



Sources

http://webdir.tistory.com/174

http://ezsimple.inmu.net/zb/view.php?id=free&no=215&page=10&headnum=

http://zeronica.tistory.com/105

https://www.linux.co.kr/


+ Recent posts