Getting a php script to run at a certain time each day independently each day?
I am in need of something like this I need a script to run independently each day at a certain time without fail, the script w开发者_如何学Pythonill be for PDO mysql and some other things,
Can anyone point me in the right direction??
Thanks
If PHP is configured to run from the commandline you can simply setup either a cronjob (crontab -e
) (Linux) or a scheduled task (Windows) where you run the php file(s) you want to run.
php -f /path/to/script.php
If you're on Linux, use a CRON Job. For Windows, use a Scheduled Task.
There are also services that do this online. A quick Google search returns this site.
精彩评论