0

I'm actually trying to test running cron jobs in my Unix server (via Cpanel 11)

I've been trying to execute WGET.

My command looks like this :

30 11 * * * wget http://www.mydomain.com/myscript.php

The server tries to run the job every 5 minutes. But then, I get an error in my email saying

/bin/sh: 30: command not found

I've tried this also

30 11 * * * /usr/lib/wget http://www.mydomain.com/myscript.php

No use. I keep getting the same error all the time. I use Siteground webhosting provider.

Any ideas?

Krish
  • 917
  • 4
  • 10
  • 23
  • I tried googling and finding related posts in Stackoverflow too. No success :( – Krish Feb 08 '13 at 10:14
  • Before programming a cronjob, you should check if `wget http://www.mydomain.com/myscript.php` itself is working. It seems to be a code problem, not cronjob. – fedorqui Feb 08 '13 at 11:19
  • Isn't `wget` a unix command? It works on my OS X shell. – Krish Feb 08 '13 at 13:45
  • You should put script path relative to the server, not the http:// one. Also, errors should be escaped using `2>/dev/null`. – fedorqui Feb 08 '13 at 14:32

0 Answers0