Would there be any way to adjust cron tasks over a PHP web interface? I was thinking I could just use shell_exec()
commands but it runs into a snag when crontab -e
launches a text editor. If cron isn't the thing to use for this job, then I will gladly take other suggestions compatible with Raspberry Pi. My end goal is just to be able to adjust the time that a program is run over a webpage.
Asked
Active
Viewed 306 times
0
![](../../users/profiles/1968182.webp)
Ulrich Eckhardt
- 15,392
- 1
- 25
- 49
![](../../users/profiles/4564622.webp)
Anders Bandt
- 21
- 2
-
I think most web-edited crons insert the specific information into a database, then use an actual cron to run a script that checks those entries. – aynber May 03 '18 at 18:27
-
https://stackoverflow.com/questions/4421020/use-php-to-create-edit-and-delete-crontab-jobs – P. Danielski May 03 '18 at 18:49
-
Mine does `exec('echo '.escapeshellarg($newcrontab).' | crontab - 2>&1',$ret,$code);` – Niet the Dark Absol May 03 '18 at 19:02
-
Thank you all very much. @P.Danielski that question helps a lot! Sorry for asking a previously asked question. – Anders Bandt May 03 '18 at 22:05