[CentOS] Re: cat cron jobs into crontab

Tue Mar 13 17:57:22 UTC 2007
Les Mikesell <lesmikesell at gmail.com>

Karl R. Balsmeier wrote:
> thanks, I'm running a script after kickstart install, and am looking to 
> "cat" a known value into an empty cron file.  Managing it or otherwise 
> having to manually edit it is not the issue i'm seeking info on.
> 
> I'm trying to avoid having to manually add all of my known cron jobs 
> with crontab -e
> 
> To do this, I was trying out some stuff like:
> 
> *cat >> $out_file << EOF
> first line of data
> second line of data
> more data
> the end of the data
> EOF*
> 
> but in a way that was safe for cron, with no modifications to the 
> default manner in which cron runs, e.g. crontab -l, crontab -e later 
> would not break seeking some new file.
> 

There are special cases for system entries where these can go in files 
with one or more entries under /etc/cron.d, or cron.daily (etc). 
However, these won't ever show up in anyone's 'cron -l' or 'cron -e' 
commands and thus aren't suitable for things that users will manage 
themselves after the install.

-- 
   Les Mikesell
    lesmikesell at gmail.com