|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Does someone know how to schedule a PHP script (like CFschedule with Cold Fusion for example) ?
Is there a way with the CRON Daemon ? |
|
#2
|
|||
|
|||
|
Yes, there is a way you can cron PHP scripts, but you must have a program that will get web pages. fetch (for FreeBSD) is a good example, but I'm sure there are many others.
Then in the cron tab you would use a command like this: /usr/bin/fetch http://www.domain.com/dir/file.php3 With the appropriate time specified of course. Basically any program that will grab a page from the web server can be used to automate a PHP script. [This message has been edited by moderator (edited 08-02-99).] |
|
#3
|
|||
|
|||
|
Another option is to compile PHP in CGI form, and use the PHP executable as a script interpreter.
Start your script: #!/usr/local/php/php {or wherever PHP is} And mark it executable. Then you can call the script directly from cron. |
|
#4
|
|||
|
|||
|
Is Fetch a text based browser like Lynx under linux ?
|
|
#5
|
|||
|
|||
|
No, fetch is a command that comes with FreeBSD systems. fetch is not included with Linux (to the best of my knowledge), but you should be able to use any command that will grab a web page to schedule your scripts.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PHP Script Scheduling ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|