2011年10月3日 星期一

Ubuntu Crontab 設定方式

直接下指令
crontab -e
或是
sudo crontab -e
在裡面編輯
Cron also offers some special strings:
  • string
    meaning

    @reboot
    Run once, at startup.

    @yearly
    Run once a year, "0 0 1 1 *".

    @annually
    (same as @yearly)

    @monthly
    Run once a month, "0 0 1 * *".

    @weekly
    Run once a week, "0 0 * * 0".

    @daily
    Run once a day, "0 0 * * *".

    @midnight
    (same as @daily)

    @hourly
    Run once an hour, "0 * * * *".
minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday), command
01 04 1 1 1 /usr/bin/somedirectory/somecommand