LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-12-2003, 02:55 PM   #1
eXor
Member
 
Registered: Mar 2002
Location: Sweden
Distribution: Slackware 10.1
Posts: 103

Rep: Reputation: 15
Cron deamon?


How dose cron deamon work?

I have a script that i wan't to be runed once a week.

I have startted the cron deamon i rc. then I copyed the my script to the /etc/cron.weekly/


Is this enought. Will the script run every week now?
 
Old 06-12-2003, 03:10 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,699
Blog Entries: 54

Rep: Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962
If /etc/cron.weekly is referenced correctly in /etc/crontab, yes.
 
Old 06-12-2003, 03:12 PM   #3
eXor
Member
 
Registered: Mar 2002
Location: Sweden
Distribution: Slackware 10.1
Posts: 103

Original Poster
Rep: Reputation: 15
My crontab file:

# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null. We'll do this here since these jobs should run
# properly on a newly installed system, but if they don't the average newbie
# might get quite perplexed about getting strange mail every 5 minutes. :^)
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
 
Old 06-12-2003, 03:26 PM   #4
eXor
Member
 
Registered: Mar 2002
Location: Sweden
Distribution: Slackware 10.1
Posts: 103

Original Poster
Rep: Reputation: 15
If i wan't a mail to be seend to root when the programs has been run how do I do then.

30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly

is that correct. Just to take away the ">1 /dev/null file".
 
Old 07-02-2003, 12:55 PM   #5
shanagg
LQ Newbie
 
Registered: Jul 2003
Distribution: Redhat 8
Posts: 3

Rep: Reputation: 0
What could be wrong if you aren't receiving email from Cron? I used to receive the cron.daily output but now I'm not. Also I could like to be able to receive other cron emails like cron.monthly etc.. Where do I set this?

Oh, I should note I'm receiving other email from root like the logwatch report.

Last edited by shanagg; 07-02-2003 at 12:56 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 09:09 AM
CRON deamon lockup during startup. Dr.Jamescook Suse/Novell 0 11-11-2004 09:56 PM
[cron][mdk9.1]cron deamon seems to ignore some task... yannrichet Linux - Newbie 5 06-26-2003 10:57 AM
dual entries in cron log for cron.daily cpharvey Linux - General 3 02-27-2003 03:30 PM
cron Deamon DJFauß Linux - General 2 01-22-2002 04:32 AM


All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration