How to create cron job using PHP?

前端 未结 12 1534
一整个雨季
一整个雨季 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条回答
  •  梦毁少年i
    2020-11-21 06:15

    First open your SSH server with username and password and change to the default root user(User with all permissions) then follow the steps below,

    1. enter the command crontab -l now you will see the list of all cronjobs.
    2. enter crontab -e a file with all cron jobs will be opened.
    3. Edit the file with your cronjob schedule as min hr dayofmonth month dayofweek pathtocronjobfile and save the file.
    4. Now you will see a response crontab: installing new crontab now again check the list of cronjobs your cron job will be listed there.

提交回复
热议问题