[kwlug-disc] Clock-time limits
kb at 2bits.com
Wed May 6 21:58:55 EDT 2009
On Wed, May 6, 2009 at 7:31 PM, Chris Irwin <chris at chrisirwin.ca> wrote:
> List, is there a way to limit the amount of clock-time a program is
> allowed to run?
> I currently use offlineimap via cron to cache my mail locally. It
> unfortunately seems to have a habit of becoming unresponsive if it
> happens to be active when I suspend/resume my laptop (probably the
> network disappearing). This then causes me to not (locally) receive any
> mail as when spawned by cron again it bails out due to the existing
> I could add 'pkill offlineimap' to the start of my wrapper script, but
> was hoping for something more elegant.
yourprogram -options &
That should limit it to running for 300 seconds only.
Khalid M. Baheyeldin
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kwlug-disc_kwlug.org