CronJob not running

前端 未结 11 1088
攒了一身酷
攒了一身酷 2020-11-22 02:33

I have set up a cronjob for root user in ubuntu environment as follows by typing crontab -e

  34 11 * * * sh /srv/www/live/CronJobs/daily.sh
  0          


        
11条回答
  •  自闭症患者
    2020-11-22 02:46

    I want to add 2 points that I learned:

    1. Cron config files put in /etc/cron.d/ should not contain a dot (.). Otherwise, it won't be read by cron.
    2. If the user running your command is not in /etc/shadow. It won't be allowed to schedule cron.

    Refs:

    1. http://manpages.ubuntu.com/manpages/xenial/en/man8/cron.8.html
    2. https://help.ubuntu.com/community/CronHowto

提交回复
热议问题