Use PHP to create, edit and delete crontab jobs?

前端 未结 12 1475
余生分开走
余生分开走 2020-11-22 06:54

Is it possible to use PHP to create, edit and delete crontab jobs?

I know how to list the current crontab jobs of the Apache user:

$output = shell_ex         


        
12条回答
  •  庸人自扰
    2020-11-22 06:59

    Depends where you store your crontab:

    shell_exec('echo "'. $job .'" >> crontab');
    

提交回复
热议问题