Re: question about cron jobs
| From: | Jonathan Pitcher | Date: | Wed, 23 Apr 2003 17:18:55 +0000 |
| Subject: | Re: question about cron jobs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145051@lists.php.net to get a copy of this message | ||
Jake,
I can be done in a couple different ways. The 2 that come to mind are:
1.) You can use the Exec command to call crontab and add the script that way. I am not familiar with doing it that way but in theory it should work.
2.) You can add a cron job that runs a specific script and it runs the script every minute of everyday. This script then checks a database of things to do and what times to run them at. If there is a match then it runs the script.
Hope this gets you in the right direction.
Jonathan Pitcher
On Wednesday, April 23, 2003, at 11:29 AM, Jake Malone wrote:
i have apache/unix running and i have shell access to the web server. i was wondering if there was some way to add a cron job from php? like for example, i have an area of my site that allows users to set options...like how often to backup the site automatically. when they change this, obviously, the cron job has to be modified. i'm a little stumped as to how to do it. thanks, -jake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php