CronIsTime Function

public function CronIsTime(time, cron) result(yes)

returns true if it is time to start a process

Arguments

Type IntentOptional Attributes Name
type(DateTime), intent(in) :: time
type(CronTab), intent(in) :: cron

Return Value logical


Source Code

FUNCTION CronIsTime &
!
(time, cron)  &
!
RESULT (yes)

IMPLICIT NONE

!Arguments with intent (in):
TYPE (DateTime), INTENT (IN) :: time
TYPE (CronTab),  INTENT (IN) :: cron 

!local declarations:
LOGICAL :: yes
!-------------------------------------end of declarations----------------------


yes = .FALSE.

IF ( cron % minutes     ( GetMinute    (time) ) == 1 .AND. &
     cron % hours       ( GetHour      (time) ) == 1 .AND. & 
     cron % daysOfMonth ( GetDay       (time) ) == 1 .AND. &
     cron % months      ( GetMonth     (time) ) == 1 .AND. &
     cron % daysOfWeek  ( GetDayOfWeek (time) ) == 1 ) THEN
    yes = .TRUE.
END IF


RETURN
END FUNCTION CronIsTime