Knowledgebase - PHP as a Cron CentOS/Fedora

Our Client Portal

Portal Home > Knowledgebase > Dedicated Servers > PHP as a Cron CentOS/Fedora

PHP as a Cron CentOS/Fedora

When adding a PHP script as a cron you need to ensure that you include the full PHP directory, simply running the following will not allow the script to run:

30 6 * * * php -q public_html/clients/scripts/mycron.php

Using the following will allow the PHP script to be used within a cron process:

30 6 * * * /usr/local/bin/php -q /home/username/public_html/clients/admin/mycron.php

Note how we need to utilise the full directory structure to ensure both the PHP process is called correctly and has the full directory of your PHP script.

Add to Favourites Add to Favourites

Was this answer helpful?

Print this Article Print this Article

Also Read

Recent News
Knowledgebase Articles
It is now possible to temporarily suspend the monitoring of Managed Dedicated Se...
Please Note: In order to reset your Centos password you will need KVM access to ...
As of Java version 7 onwards, the Java development team continue to make securit...
Live Chat

Need a helping hand?

We've got a lot of solutions to choose from so why not let one of our experts help!

Live Chat

Find this popup annoying?

If so, we're very sorry! You can prevent further invitations by selecting "YES" below