Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a cron job in cpanel. The result is this:

*   *   *   *   *   /usr/local/bin/wget

The problem is that is not working. Can anyone give me a hint why please?

share|improve this question

closed as off-topic by Jenny D, kasperd, Ward, masegaloeh, Scott Pack Apr 12 '15 at 4:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Check command manual. Use ssh to connect server and run command "/usr/local/bin/wget ..." – alvosu Feb 9 '11 at 10:54
you cron job is to wget ? or download it and run the file cron ? Regards, Sim – Sim Feb 9 '11 at 11:27
I want to run a script at a specified url. – zozo Feb 9 '11 at 11:27
up vote 0 down vote accepted

With your cron entry, specifying no minutes, hours or anything, cron will run EVERY DAY, EVERY HOUR and EVERY MINUTE, starting wget to download the file from the URL passed to wget.

It will not execute that script, just download it. If you want to download and execute it you must do something like:

/usr/local/bin/wget && sh cron

But check to which directory it gets downloaded. Better would be to write these commands in a small shell script and execute that script:

cd $MY_DIR
[ -f cron ] && sh cron

and in the crontab file just execute the above script. But set the times you want it to run, you probably don't want it to run every minute!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.