Er I think I might of stated things wrong.
At the moment what the script will do is grab some text via CURL, then create a file with that text, then it has to run a linux command. It has to do this all in sync too.
I don't actually need the php script run every certain few, I might of just explained it wrong though, but what I'm tyring to do is either log on ssh/ftp wise and run a linux program, or just run the command itself since the script is running on the local machine where the linux program is.
Basicly the linux program will grab the information itself after running it, but everything must be there or else it will error out. For sakes lets just say I want to run a linux 'find' command every time I run the script.
Basicly my issue is how to run a linux command on the box without having to do it manually.
Main Topics
Browse All Topics





by: sentibluePosted on 2008-07-30 at 15:42:27ID: 22125439
/etc/cron.d/
Check that folder, put in a new file something like myphp_commands
Then in that file you can spell out the cron schedule and command to run
In order to run a php file, just preceed the file.php with the path and executable of the php compiler
example
*/5 * * * * /usr/local/php /var/www/httpd/test.php
This will run the test.php file every 5 mins... correct my schedule syntax if I'm wrong...
the part /usr/loca/php may vary on different machiens... depending on how you install php