Cronjob every minute

后端 未结 5 1906
遇见更好的自我
遇见更好的自我 2020-12-18 18:42

I have a file in mysite.com/url1/url2/cronjob.php which has to be run every minute. I try every combination, but can\'t succeed. What should I run in command line? Thank you

5条回答
  •  天涯浪人
    2020-12-18 19:23

    I got confused for the first time where to add all of these and finally found.

    Type the following in the linux/ubuntu terminal

     crontab -e 
    

    select an editor (sometime it asks for the editor) and this to run for every minute

    *       *       *       *       *       /usr/bin/php path/to/cron.php &> /dev/null
    

提交回复
热议问题