Jump to content
xisto Community
Ousk

How To Configure Cron Jobs?

Recommended Posts

Ok so i have seen the topic about this and in cpanel chose advanced and wrote /usr/local/bin/php -q /home/*myusername*/public_html/cron.php in the field and 40 in the minute slot in front, but with no luck, still the cron job for drupal does not run. Why? :D

Share this post


Link to post
Share on other sites

I would apreciate if anyone could help a litle more please, i too must know how to create cron jobs, i did not search the internet yeat because i wanted to get help over here, so if anyone could explain how , i apreciate it, i have a wordpress blog which needs a cron job because of a plugin i have, and it gave a code create a cron job, but i do not know where to execute or insert that code for the cron job.Can anyone tell me where i do execute code already given to create a cron job?

Share this post


Link to post
Share on other sites

I'm assuming cron.php contains list of instructions? Remember that cron itself has standard commands such as copy, "cp" with command extensions, i.e. r for replace etc.And the correct path name you should use is/home/cpanel_name/public_html/cron.phpif the file you want to execute is within public_html folder. /home/cpanel_name/cron.phpif the file is located outside public_html folder.A simple example to copy a file over, writing over the existing file from location A to B:cp -rf /home/cpanel_name/public_html/A/filename /home/cpanel_name/B/Notice that I can copy outside of the public_html because /home/cpanel_name/ is my root directory. The same file name will be preserved and the existing file in location B will be overwritten without confirmation. This can be entered directly to Cron job using Standard method. No need to enter Unix command form.

Share this post


Link to post
Share on other sites

hmm now it works with the /usr/local/bin/php -q /home/*myusername*/public_html/cron.php don't know why it didn't before. i use 0 12 * * * /usr/local/bin/php -q /home/*myusername*/public_html/cron.php and it runs every 12 hours

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.