LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 04-21-2009, 11:12 PM   #1
wimnat
Member
 
Registered: Dec 2004
Location: Sydney, AU
Distribution: CentOS 5.x, Backtrack
Posts: 72

Rep: Reputation: 16
Question crontab -e what does it actually edit?


Hey,

I am currently developing a kickstart install and as a post-install task I want to add a bunch of crontab entries.

Usually when adding to cron I use the crontab -e command but I couldn't actually find any crontab file that i can just pipe my entries to in a script e.g. * * * * * run_this >> /somewhere/thecrontabfile

Any ideas?

Thanks,

W
 
Old 04-21-2009, 11:15 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Typically the files are in /var/spool/cron
 
Old 04-22-2009, 01:53 AM   #3
wimnat
Member
 
Registered: Dec 2004
Location: Sydney, AU
Distribution: CentOS 5.x, Backtrack
Posts: 72

Original Poster
Rep: Reputation: 16
Found it! Thanks
 
Old 05-26-2009, 09:48 PM   #4
wimnat
Member
 
Registered: Dec 2004
Location: Sydney, AU
Distribution: CentOS 5.x, Backtrack
Posts: 72

Original Poster
Rep: Reputation: 16
Hey I ran in to a problem with editing /var/spool/cron...

I can copy the file there no problem and a service crond restart works fine.

However, if i try to edit the file with crontab -e, upon closing i get

crontab: installing new crontab
"/tmp/crontab.XXXXofvZpx":4: bad minute
errors in crontab file, can't install.

If i delete everything in the file then re-enter it exactly as before then it installs fine.

Any ideas?
 
Old 05-26-2009, 09:53 PM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Posting what's in there might help.
 
Old 05-26-2009, 10:26 PM   #6
wimnat
Member
 
Registered: Dec 2004
Location: Sydney, AU
Distribution: CentOS 5.x, Backtrack
Posts: 72

Original Poster
Rep: Reputation: 16
Sorry, I fixed it.

I was editing the file in Windows and so I just needed to save the file in Unix format.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not edit crontab AbrahamJose Solaris / OpenSolaris 1 02-19-2009 08:31 AM
Bash sciript to edit crontab pdonaghy Linux - Desktop 4 08-12-2008 12:24 AM
Can't Edit Crontab rignes Linux - Software 1 04-04-2007 11:01 AM
crontab disabled after edit on solaris 5.x machines BlackHatRob Solaris / OpenSolaris 1 01-18-2007 09:13 AM
crontab doesn't let me to edit wedgeworth Linux - Software 10 09-17-2003 12:15 PM


All times are GMT -5. The time now is 09:53 PM.

Main Menu
 
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
Open Source Consulting | Domain Registration