How to create cron job using PHP?

前端 未结 12 1487
一整个雨季
一整个雨季 2020-11-21 05:50

I\'m new to using cron job. I don\'t even know how to write it. I have tried to search from internet, but I still don\'t understand it well. I want to create a cron job that

12条回答
  •  囚心锁ツ
    2020-11-21 06:04

    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
    

提交回复
热议问题