Hi

I am a little stuck with the cron job set up. I want to set it to run automatically, but cannot quite understand what I need to do.

On my server, I have located this file:

/var/spool/cron/xxx

which is currently empty. I have gathered that I need (I think) to input a command into this file, but am not sure what command.

I have read the Drupal cron page, and added this to my cron file:

45 * * * * /usr/bin/lynx -source http://example*.co.uk/cron.php

Also, is an Apache restart required after modifying the /var/spool/cron/xxx file?

Maybe I have done it, but confirmation either way would be good!

Cheers

Jon.

*obviously changed

Comments

goldschmidt.a’s picture

You should be able to run cron through a cron manager on your server's host (GoDaddy, etc.).

If your server host doesn't allow automatic cron jobs, try out the Poormanscron module (http://drupal.org/project/poormanscron). With that, you can configure to automatically run cron job as often as you want.

Sincerely,
Andrew G

yelvington’s picture

A few minutes with Google will yield a wealth of information about the Unix cron system.

Or, you can "man cron" and start reading.

You should never modify /var/spool/anything manually. Leave that to the system to manage.

The cron facility is entirely separate from Apache, and you do not need to stop/restart anything after editing a crontab.

Each user has a separate crontab file. To edit the file, you use this command:

crontab -e

This will safely open your crontab in the editor that's defined as the default in your environment, which is probably vi. When you save and exit, your new crontab is installed.

As Andrew G. mentioned, you may have a Web-based management tool also available if you're using a remote webhost. On a Linux desktop system you may have Gnome Schedule or Kcron available, which are graphical editors for the cron system.