how to set cron job from php script?

后端 未结 3 941
Happy的楠姐
Happy的楠姐 2021-02-06 06:02

i am new to cron job . i studied some basics about cron job . i can able to call php using cron tab. By using following command in /etc/crontab

  10 *    * * *           


        
3条回答
  •  隐瞒了意图╮
    2021-02-06 06:39

    You should be able to add it directly

    echo "2 * * * * /usr/bin/php /var/www/PATH TO THE SCRIPT/crontest1.php\n" > /etc/cron.d/username
    

提交回复
热议问题