Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

How To Configure Cron Jobs?


7 replies to this topic

#1 Ousk

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Iasi, Romania
  • myCENT:69.28

Posted 15 March 2009 - 12:02 PM

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

#2 Nabb

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 244 posts
  • Gender:Male
  • Location:Australia
  • myCENT:58.68
  • Spam Patrol

Posted 15 March 2009 - 01:23 PM

Try this: wget -O - -q -t 1 http://your.website.com/cron.php

And for the timing - I don't see how you would need to run cron more than once a day, so probably pick any values for minute/hour and *'s for the other fields.

#3 Ousk

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Iasi, Romania
  • myCENT:69.28

Posted 15 March 2009 - 02:53 PM

not working but thx for the reply

#4 Pankyy

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 123 posts
  • Gender:Male
  • Location:Nowhere near you
  • myCENT:85.90

Posted 15 March 2009 - 11:44 PM

The real deal to me is, in the Advanced Mode:

* * * * * (Set to which hour, etc, date) : curl http://URL.com

Try if that works for you, it works for me.

#5 Ousk

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Iasi, Romania
  • myCENT:69.28

Posted 16 March 2009 - 12:26 PM

don't really get what i should enter i tried it but.. no results i think i'll just use poormanscron

#6 freeflashclocks

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 131 posts
  • Interests:My Girl, Movies, Books, My website about Flash Clocks
  • myCENT:94.81

Posted 16 March 2009 - 09:12 PM

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?

#7 BuffaloHelp

    Sterling Archer

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 4,088 posts
  • Gender:Male
  • myCENT:50.18

Posted 17 March 2009 - 02:01 AM

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.php

if the file you want to execute is within public_html folder.

/home/cpanel_name/cron.php

if 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.

#8 Ousk

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Iasi, Romania
  • myCENT:69.28

Posted 19 March 2009 - 05:17 PM

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




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users