GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATETIME::CRON::SIMPLE (3)

.ds Aq ’

NAME

DateTime::Cron::Simple - Parse a cron entry and check against current time

CONTENTS

SYNOPSIS



  use DateTime::Cron::Simple;

  $c = DateTime::Cron::Simple->new($cron);

  $boolean = $c->validate_time;

  $c->new_cron($cron);



DESCRIPTION

This module is a quick and dirty way to determine if a cron time format is valid for the current date and time.

A cron entry follows the cron format from crontab(5).

The validate_time function uses the current date and time for comparison, but will also accept a valid DateTime object as a parameter.

EXAMPLE



  use DateTime::Cron::Simple;

  $c = DateTime::Cron::Simple->new(0-59/2 10,12 * * 5);

  if($c->validate_time) { ... }

  $c->new_cron(* * 1 * 0);

  if($c->validate_time) { ... }



CHANGES

Please see the CHANGES file in the module distribution.

TO-DO



 - currently does not handle ! and > or < in cron entries
 - better code implementation



AUTHOR

Brendan Fagan <suburbanantihero (at) yahoo (dot) com>. Comments, bug reports, patches and flames are appreciated.

COPYRIGHT

Copyright (c) 2004 - Brendan Fagan
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SIMPLE (3) 2004-02-12

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.