Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: several crontab files
PostPosted: Wed Jul 23, 2008 4:24 am 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Hello.
I am using the /etc/crontab files and it works well.
I'd like to add the content of the file located at
/test/crontab
to each time cron runs.

Is there a way to register that /test/crontab? Should I add a special line to the /etc/crontab to call a the /test/crontab file as well? I am not sure what to do and I don't want to break anything.

Thank you


Top
   
 Post subject:
PostPosted: Wed Jul 23, 2008 8:55 am 
Offline

Joined: Wed Jul 23, 2008 4:00 am
Posts: 1
ICQ: 7434490
Website: http://www.remotelinuxadmin.net/
WLM: petrhamak@gmail.com
Hello,

from man:

Quote:
cron also reads /etc/crontab, which is in a slightly different format (see crontab(5)). Additionally, cron reads the files in /etc/cron.d: it treats the files in /etc/cron.d as in the same way as the /etc/crontab file (they follow the special format of that file, i.e. they include the user field).


So you can:
1. place your other crontabs to /etc/cron.d
2. symlink /test/crontab to /etc/cron.d/, for ex. ln -s /test/crontab /etc/cron.d/mynewcrontab

Petr

_________________
Remote Linux Admin - Linux and FreeBSD administrator for you


Top
   
 Post subject:
PostPosted: Wed Jul 23, 2008 11:28 am 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Special note: both the symlink itself and the target must be owned by root.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Sat Jul 26, 2008 1:40 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Thank you very much; it solves my problem


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group