Jump to content

Creating a Cron Job with PHP


pea

Recommended Posts

the normal way to edit the cron is with 'crontab -e', which opens the cron in a text editor. obviously, you can't do this with PHP exec(), but you can also do 'crontab filename' and it will install the contents of 'filename' as the new cron. So using PHP create a temporary file will all the cron info in it (not just new, old and new) then run 'crontab /path/to/file' via one of PHP's exec() functions

This forum really needs an edit option.

 

You're allowed to make an edit up to like 2-3m after you post (don't remember exact window).  But past that, we've disabled it, due to people constantly deleting posts and threads after the fact, or else going back later and editing and then it causes confusion in the whole problem solving process.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.