[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

chron job

Posted on 1998-01-10
2
Medium Priority
?
392 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
[X]
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
2 Comments
 
LVL 2

Accepted Solution

by:
mlev earned 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 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