TaskForest::TimeDependency - A time constraint on a job
use TaskForest::TimeDependency; # Assume it is now 20:55 (8:55 pm) in Chicago $td = TaskForest::TimeDependency->new( start => '21:00', tz => 'America/Chicago', ); $a = $td->check(); # $a == 0, $a->{status} eq 'Waiting' # 5 minutes go by # $a->{status} is still 'Waiting', but after $a = $td->check(); # now $a == 1 and $a->{status} is now 'Success'
If you're just looking to use the taskforest application, the only documentation you need to read is that for TaskForest. You can do this either of the two ways:
perldoc TaskForest
OR
man TaskForest
A TimeDependency is an object that a job depends on. It has a time (and time zone) associated with it. Just as a job can depend on another job, a job can also depend on a TimeDependency. The check() function is used to determine whether or not a time dependency has been met.
Usage : my $td = TaskForest::TimeDependency->new(); Purpose : The TimeDependency constructor creates a simple TimeDependency data structure. Other classes will set and examine status and return code. Returns : Self Argument : Attributes as a hash. If a single scalar is provided, then that is considered to be a DateTime object - essentially a copy constructor. Throws : "TimeDependency does not have a start/end time"
Usage : $td->check(); Purpose : Checks to see whether the time dependency has been met or not. Returns : 1 if it has been met. 0 otherwise. Argument : None Throws : Nothing
To install TaskForest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TaskForest
CPAN shell
perl -MCPAN -e shell install TaskForest
For more information on module installation, please visit the detailed CPAN module installation guide.