Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: remove crontab entries

by Plankton (Vicar)
on Jul 22, 2004 at 20:39 UTC ( [id://376712]=note: print w/replies, xml ) Need Help??


in reply to remove crontab entries

I don't know anything about Schedule::Cron but you could do something like this ...
$ crontab -l 5 5 * * * touch cron_ran_`date| tr ' :' '_'` 10 10 * * * doSomethingOrOther $ crontab -l | grep -v touch | crontab $ crontab -l 10 10 * * * doSomethingOrOther
If you need cron to remove the job itself just set up your crontab like this ...
5 5 * * * touch cron_ran_`date| tr ' :' '_'` && crontab -l | grep -v t +ouch | crontab 10 10 * * * doSomethingOrOther

Plankton: 1% Evil, 99% Hot Gas.

Replies are listed 'Best First'.
Re^2: remove crontab entries
by Jonathan (Curate) on Jul 23, 2004 at 15:08 UTC
    Schedule::Cron doesn't use cron - it forks off its own scheduler process therefore touching the crontab file won't affect it. As the poster said there isn't a suitable method to remove an individual job.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://376712]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found