Solved

chron job

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 87
substring method in java 1 141
ERP and the other system process verification 5 22
Adjust the codes 3 60
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 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