$c = new Config::Crontab; $c->owner('joe'); $c->read; ## reading joe's crontab $c->write; ##write out to joe's crontab... $c->owner('bob'); #change user to bob $c->write; #write same crontab to bob's crontab #### my $crontab; if( my $owner = $self->owner ) { $crontab = `crontab -u $owner $tmpfile 2>&1`; } else { $crontab = `crontab $tmpfile 2>&1`; } chomp $crontab; unlink $tmpfile; if( $crontab || $? ) { $self->error($crontab); if( $self->strict ) { carp "Error writing crontab (crontab exited with status " . ($? >> 8) . "): " . $self->error; } return; } } return 1; }