[Bio] / FigKernelScripts / seed_job_scheduler.pl Repository:
ViewVC logotype

View of /FigKernelScripts/seed_job_scheduler.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Mon Dec 6 18:32:37 2004 UTC (15 years, 3 months ago) by olson
Branch: MAIN
Add job scheduler script.

#
# Background task scheduler.
#

use JobScheduler;

my $js = new JobScheduler;

while (1)
{
    my ($job, $lock) = $js->get_job_to_execute();

    if ($job)
    {
	print "Running job $job->{id}\n";
	$job->run($lock);
    }
    else
    {
	print "No jobs found, sleeping\n";
	sleep(10);
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3