NAME
TaskForest::TimeDependency - A time constraint on a job
SYNOPSIS
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'
DOCUMENTATION
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
DESCRIPTION
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.
METHODS
- new()
-
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"