[kwlug-disc] Clock-time limits

Andrew Kohlsmith (Mailing List Account) aklists at mixdown.ca
Sun Jun 14 22:19:14 EDT 2009

On May 6, 2009 07:31:15 pm Chris Irwin 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
> process.
> I could add 'pkill offlineimap' to the start of my wrapper script, but
> was hoping for something more elegant.

ulimit -t sounds like what you're looking for.

man bash, search for ulimit.  I use this to test fork bombs.  :-)


More information about the kwlug-disc mailing list