Reputation:
Is it possible to set up a cron job that will execute a php script?
I have a php file and i want to run every 15 minutes using cron job.
My php file path: www.sitename.com/runcron.php
full path: /var/www/vhosts/sitename/httpdocs/runcron.php
I using centos server.
Thank you
Upvotes: 3
Views: 5760
Reputation: 26259
Add this line to your crontab, and make sure the location of php
is correct (check it out with which php
).
*/15 * * * * /usr/bin/php /var/www/vhosts/sitename/httpdocs/runcron.php
That's simple ;-)
Upvotes: 10