Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

chron job

Posted on 1998-01-10
2
386 Views
Last Modified: 2013-12-26
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?
0
Comment
Question by:bazzle
2 Comments
 
LVL 2

Accepted Solution

by:
mlev earned 100 total points
ID: 1295899
echo "00 0 * * sun PATH-TO-COMMAND" > some_file
crontab some_file
0
 
LVL 3

Expert Comment

by:braveheart
ID: 1295900
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.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Creating Labels and Frequency list style reports in SAS code 9 105
viewing source code from eclipse 13 110
has77  challenge 9 89
I could not set window to top 4 20
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question