Solved

chron job

Posted on 1998-01-10
2
381 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now