in reply to Manipulating crontab

tune,

As always, it depends on what you need, but I could envision a very simple script that would create a file with the appropriate cron information in it, then executes with a system call  system ("crontab",$FILE);.

Should be pretty easy. If there is other stuff in the crontab for that user, it gets a little tricker, but it shouldn't be undoable.

Scott

Replies are listed 'Best First'.
Re: Re: Manipulating crontab
by Graham (Deacon) on Jun 21, 2001 at 20:17 UTC
    If you wanted to get the crontab for Auser, you could do
    my $user = "Auser"; my @crontab=`crontab -l $user`
    Edit @crontab, and output it to a file, then execute the system call.