On Thu, Nov 11, 2010, Nicolas Ross wrote: >On another note, on the same subject (xServes being disontinued), one >feature we use heavily on our os-x server is the ability to load / unload >periodic jobs with launchd. > >With it we're able to schedule jobs let's say every 5 minutes, and so on. >One could say I could do something like "*/5 * * * * /path to job" in >crontab. True, but the big advendage of launchd in that matter, is that it's >5 minutes between jobs. So if the job takes 6 minutes, we will never have 2 >time the same job running at the same time. > >We even have a job that is scheduled to run every 60 seconds, but can take 2 >hours to complete. > >Is there any scheduler under linux that approch this ? There are various ways of handling this type of problem. One consideration is whether it's OK for a job to start if the previous job has not completed. This is application specific, and I don't know of any scheduler that does this (enlighten me if there is :-). I have seen cases of daily processing that do things like update the ``locate'' database which may well not complete within 24 hours on large file systems. Without checking for completion of the previous day's run, this can end up creating problems. For shell scripting, we often use the ``shlock'' program which I got originally from the ``inn'' news software. There's a perl module LockFile::Simple that handles this for perl, and I've hacked a python implementation of that module. These all write the pid of the controlling process to a lockfile which can be read to test for stale jobs if the original job didn't properly remove its lock file. Bill -- INTERNET: bill@xxxxxxxxxxxxx Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792 Power is evil in itself, regardless of who exercises it...Every dictator plans to rear, feed and train his fellow men as the breeder does his cattle. -- Ludwig von Mises _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos