Unix Technical Forum

Adding line in crontab from command line...

This is a discussion on Adding line in crontab from command line... within the comp.unix.solaris forums, part of the Solaris Operating System category; --> On 2008-04-10, Helmut Kreft <kreft@unfug.org> wrote: > crontab -l | (cat;echo "00 1 * * * /monitor_file_system") | crontab ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-17-2008, 04:05 PM
Andreas F. Borchert
 
Posts: n/a
Default Re: Adding line in crontab from command line...

On 2008-04-10, Helmut Kreft <kreft@unfug.org> wrote:
> crontab -l | (cat;echo "00 1 * * * /monitor_file_system") | crontab


Yup but the cat process can be avoided:

(crontab -l; echo "00 1 * * * /monitor_file_system") | crontab

Andreas.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-17-2008, 04:05 PM
Helmut Kreft
 
Posts: n/a
Default Re: Adding line in crontab from command line...

On Mon, 14 Apr 2008 22:27:16 +0200 (CEST), Andreas F. Borchert wrote:
> On 2008-04-10, Helmut Kreft <kreft@unfug.org> wrote:
>> crontab -l | (cat;echo "00 1 * * * /monitor_file_system") | crontab

>
> Yup but the cat process can be avoided:
>
> (crontab -l; echo "00 1 * * * /monitor_file_system") | crontab
>


Damn... useless use of cat. I have been caught.

Helmut

--
Almost everything in life is easier to get into than out of.
(Agnes' Law)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-29-2008, 08:16 PM
Jaga.venu@gmail.com
 
Posts: n/a
Default Re: Adding line in crontab from command line...

Is there way to JUST append a new line to crontab by program, so that
the other already running cornjobs will function without any
interrupt?

Thanks,
Jagadeesh


On Apr 15, 2:21 am, Helmut Kreft <kr...@unfug.org> wrote:
> On Mon, 14 Apr 2008 22:27:16 +0200 (CEST), Andreas F. Borchert wrote:
> > On 2008-04-10, Helmut Kreft <kr...@unfug.org> wrote:
> >> crontab -l | (cat;echo "00 1 * * * /monitor_file_system") | crontab

>
> > Yup but the cat process can be avoided:

>
> > (crontab -l; echo "00 1 * * * /monitor_file_system") | crontab

>
> Damn... useless use of cat. I have been caught.
>
> Helmut
>
> --
> Almost everything in life is easier to get into than out of.
> (Agnes' Law)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 04-29-2008, 08:16 PM
Horst Scheuermann
 
Posts: n/a
Default Re: Adding line in crontab from command line...

Jaga.venu@gmail.com writes:

> Is there way to JUST append a new line to crontab by program, so that
> the other already running cornjobs will function without any
> interrupt?


- running cronjobs are not interrupted by changing the crontab.
- You can add lines to Your /var/spool/cron/crontabs/<user> file with
any programm, but You have to tell the cron-daemon, that the
crontab has changed. This is done by the crontab command.
--
11. Gebot: Wenn Du eine Fahrradklingel hörst, dreh Dich um, reiße
Mund, Nase und Augen auf, trete aber keinesfalls zur Seite.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:25 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com