Link to home
Start Free TrialLog in
Avatar of bazzle
bazzle

asked on

chron job

How do I set up a chron job on a unix server to launch a perl script (that sends out an email) once a week?
ASKER CERTIFIED SOLUTION
Avatar of mlev
mlev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of braveheart
braveheart

For a start, the cron daemon must be running on your machine - if it isn't then ask root. Then you must create a file and submit it to cron using crontab. Bear in mind that cron executes the command inside its own Bourne shell and does not source any .profile, .login or .cshrc files so you may have to wrap your command in a shell script or at least specify full pathnames for the command used. It may also not understand ~bazzle, etc.

RTFM for cron and crontab to work out the rest of the details.

I suspect that mlev's suggestion is either wrong or machine specific - the "sun" should be "0" which would cause cron to execute the supplied command, including its pathname, at 00 minutes past 0 for any day of any month, so long as it is day 0,
i.e sunday.

Use crontab -l to list what cron thinks the current contents of your crontab file are.