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

Annotation of /FigKernelScripts/seed_job_scheduler.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : olson 1.1 #
2 :     # Background task scheduler.
3 :     #
4 :    
5 :     use JobScheduler;
6 :    
7 :     my $js = new JobScheduler;
8 :    
9 :     while (1)
10 :     {
11 :     my ($job, $lock) = $js->get_job_to_execute();
12 :    
13 :     if ($job)
14 :     {
15 :     print "Running job $job->{id}\n";
16 :     $job->run($lock);
17 :     }
18 :     else
19 :     {
20 :     print "No jobs found, sleeping\n";
21 :     sleep(10);
22 :     }
23 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3