Cron help

My cron jobs don't seem to be running

Page 1 of 1

4 Replies - 1024 Views - Last Post: 12 November 2007 - 08:24 PM

#1 im@geek  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 94
  • Joined: 18-February 05

Cron help

Post icon  Posted 12 November 2007 - 03:30 PM

Hi everyone.

I am trying to setup a cron job on my web server (1 & 1) to import RSS feeds every hour - everyday. But it does not seem to be working. My crontab entries are:

u46781660:~ > crontab -l
* 0-23 * * 0-6 /module.php?module=rss_import_do_import //import the feeds
* 0-23 * * 0-6 echo hi > test.txt //test to see if the cron is running

Is there there anything wrong with my syntax.

Is This A Good Question/Topic? 0
  • +

Replies To: Cron help

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Cron help

Posted 12 November 2007 - 03:34 PM

Not sure what control panel or software your web host uses, but typically the cron must use the absolute path to the file.

For instance: /var/www/vhosts/yourdomain.com/module.php......
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5327
  • View blog
  • Posts: 27,244
  • Joined: 10-May 07

Re: Cron help

Posted 12 November 2007 - 03:43 PM

Do you have other cron jobs running on this server? I'm wondering if you have executable permissions on the server from cron.
Was This Post Helpful? 0
  • +
  • -

#4 im@geek  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 94
  • Joined: 18-February 05

Re: Cron help

Posted 12 November 2007 - 04:07 PM

View Postno2pencil, on 12 Nov, 2007 - 04:43 PM, said:

Do you have other cron jobs running on this server? I'm wondering if you have executable permissions on the server from cron.


No this are my only cron jobs
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5327
  • View blog
  • Posts: 27,244
  • Joined: 10-May 07

Re: Cron help

Posted 12 November 2007 - 08:24 PM

View Postim@geek, on 12 Nov, 2007 - 03:30 PM, said:

u46781660:~ > crontab -l
* 0-23 * * 0-6 /module.php?module=rss_import_do_import //import the feeds
* 0-23 * * 0-6 echo hi > test.txt //test to see if the cron is running

Is there there anything wrong with my syntax.


1st, I would check to make sure that you have cron privledges with the provider.
2nd, I would check to make sure that they allow php to run from the command prompt
3rd, I would put echo hi > test.txt inside of a bash script & just launch that, rather than have trailing arguments jammed into one cron job.

#!/bin/sh
#
# test.sh
# make sure that the file is empty
cat /dev/null > test.txt 
echo hi > test.txt


don't forget to chmod +x the file

then just put that script into your cron tab.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1