[INFO] The Cron Jobs Instruction

origin

Regular Member
Nov 11, 2008
333
93
Cron job is like time scheduler. I noticed that some of you have no idea how to make cron jobs working. I collected information from many resources, so here it is:

Cron job working via CPanel

1. Login to your cpanel.
2. Click cron icon.
3. Click standard.
4. Enter your email address for reporting if the cron is failed.
5. Choose the time what you want.
6. Enter the command, it depends on your server hosting.

the command should be like this:

Code:
curl -s -o /dev/null http://yourdomain.com/your_script.php

if curl is disable form your hosting service, you can use another way, with this:

Code:
lynx -dump http://yourdomain.com/your_script.php > /dev /null

if curl and lynx is disable form your hosting service, you can use another way, with this:

Code:
/usr/bin/wget -O /dev/null /home/your_username/public_html/script.php

or

Code:
GET http://yourdomain.com/your_script.php > /dev /null

if curl, lynx and wget is disable form your hosting service, you can use another way, with this:

in the your_script.php file put this at the top the first line before anything:

Code:
!#/usr/bin/php

and use this cron command

Code:
php -f /home/your_username/public_html/your_script.php

note:
file your_script.php should chmod 755
and the /home/your_username/ is your path on server.

if you have still problem, like " No input file specified. ", please try this:

Code:
links http://yourdomain.com/your_script.php

Save it and done...

Hope this helps.
 
Hi, Thanks for the post but could you please tell me what does cron job do?
 
It execute some script that you put on the cron list based on time (when you set the codes should be executed).
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock