LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-08-2003, 07:47 AM   #1
niehls
Member
 
Registered: Jun 2002
Location: Sweden
Distribution: slack, redhat
Posts: 91

Rep: Reputation: 15
crontab syntax


this is probably a simple problem, but it seems i can't get it to work.
i'm running redhat 7.2 on my server, and i'm trying to set up crontab to run cron.daily 23:55 every day. this is because there is a script in cron.daily which sends me various server statistics to my email..
i'm using the following syntax: (/etc/crontab)

# run-parts
01 * * * * root run-parts /etc/cron.hourly
55 23 * * * * root run-parts /etc/cron.daily //this i my edited row
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

but it doesn't seem to work.. ( no mails recieved)
i know the script works flawless, so something must be wrong with the crontab file.

do i have to do something to activate these settings?
like crontab -u root crontab
or something? help me..pretty new with this crontab thingy.
 
Old 03-08-2003, 11:51 AM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Re: crontab syntax

Quote:
Originally posted by niehls

i'm using the following syntax: (/etc/crontab)

# run-parts
01 * * * * root run-parts /etc/cron.hourly
55 23 * * * * root run-parts /etc/cron.daily //this i my edited row
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
You have an extra asterisk in the line you edited. Check out the crontab(5) man page to see why that line is wrong. (It's explained quite clearly. Really.)

Later...

Rick
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
syntax SmithSmith123 Linux - Newbie 2 11-17-2005 04:45 PM
Help with syntax dr3vi1 Linux - Newbie 7 08-09-2005 10:20 AM
C++ syntax error before :: token HELP, i cant find the syntax error :( qwijibow Programming 2 12-14-2004 06:09 PM
How to type in syntax to create a crontab with RH9 SoNewItHurts Linux - Newbie 5 02-20-2004 12:09 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:51 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
Open Source Consulting | Domain Registration