I want to have a web interface to control when to call a PHP script. In this interface I want to be able to set certain times or ranges that a script will be called. This information will be stored in a DB. When I hit save I want to have it read all the scheduled times from the DB, then format it and write it to a crontab for a cron job. Is there a way to have PHP modify a crontab file?
3条回答 默认 最新
douduan9391 2009-11-29 00:09关注I would go for creating a "cron_runner.php" script that runs every minute, reads the cron data and runs them accordingly. It feels like reinventing the wheel but at least you have no problems with the file permissions.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报