NAME
Schedule::Depend::Execute
Execution front end for schedules. Main use is tying together the various modules used with S::D for running a set of jobs. Exports "runsched" to pass in the schedule and optional sequence of schedule items to debug for #! code.
SYNOPSIS
# run the default schedule in
# $Schedule::Depend::Execute::defalts{sched}.
#
# this is normal for production jobs.
#
# a local "Defaults" module is used to
# set up %Schedule::Depend::Execute::defaults.
use Schedule::Depend::Execute;
use Defaults;
runsched;
# use a specific schedule -- mainly useful
# for debugging schedule components or
# running portions of a larger schedule as
# utility functions.
my $schedule =
q{
dothis : dothat
another : dothis
};
runsched $schedule;
# extra arguments are run without forking in the
# order given if "--debug" is passed on the command
# line.
runsched $schedule, qw( dothat dothis another );
# run only a subset of the jobs.
runsched $schedule, qw( dothat dothis );
NOTES
The first two examples are a reasonable production job. If "--debug" is passed in on the command line then the last schedule is prepared and validated, after which the sequence of jobs is run single-stream, without forking in the order given.
During development the schedule sequence can be debugged by adding new items to the execution array and running the #! code with --restart and --debug to skip previously completed jobs and run the new ones. A single step in the schedule can be debugged by passing it as the single item in the list:
runsched $schedule, 'dothis';
will run only a single item in the schedule if "--debug" is on the command line.
Within Execute.pm, the various modules that will be used for a given job or set of schedules is added via "use base":
use base
qw(
Foo::Module
Bar::AnotherModule
Schedule::Depend
);
and the que object is prepared within the Execute package to allow the methods to be called from a schedule.
Separate projects will normally require their own Project::Execute to tie the pieces of that project together.
KNOWN BUGS
None, yet.
2DO
These might be re-written as que methods to clean up issues accessing the defaults hash.
AUTHOR
Steven Lembark, Workhorse Computing <lembark@wrkhors.com>
Copyright
(C) 2001-2002 Steven Lembark, Workhorse Computing
This code is released under the same terms as Perl istelf. Please see the Perl-5.8 distribution (or later) for a full description.
In any case, this code is release as-is, with no implied warranty of fitness for a particular purpose or warranty of merchantability.