Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 32.401.595 Times

DateTime::Event::Cron 0.07

  Date Added: June 11, 2010  |  Visits: 831


Report Broken Link
Printer Friendly Version

Product Homepage
Download (71 downloads)

DateTime::Event::Cron is a DateTime extension for generating recurrence sets from crontab lines and files. SYNOPSIS use DateTime::Event::Cron; # DateTime::Set construction from crontab line $crontab = */3 15 1-10 3,4,5 */2; $set = DateTime::Event::Cron->from_cron($crontab); $iter = $set->iterator(after => DateTime->now); while (1) { my $next = $iter->next; my $now = DateTime->now; sleep(($next->subtract_datetime_absolute($now))->seconds); # do stuff... } # List of DateTime::Set objects from crontab file @sets = DateTime::Event::Cron->from_crontab(file => /etc/crontab); $now = DateTime->now; print "Now: ", $now->datetime, "n"; foreach (@sets) { my $next = $_->next($now); print $next->datetime, "n"; } # DateTime::Set parameters $crontab = * * * * *; $now = DateTime->now; %set_parms = ( after => $now ); $set = DateTime::Event::Cron->from_cron(cron => $crontab, %set_parms); $dt = $set->next; print "Now: ", $now->datetime, " and next: ", $dt->datetime, "n"; # Spans for DateTime::Set $crontab = * * * * *; $now = DateTime->now; $now2 = $now->clone; $span = DateTime::Span->from_datetimes( start => $now->add(minutes => 1), end => $now2->add(hours => 1), ); %parms = (cron => $crontab, span => $span); $set = DateTime::Event::Cron->from_cron(%parms); # things with the DateTime::Set # Every RTFCT relative to 12am Jan 1st this year $crontab = 7-10 6,12-15 10-28/2 */3 3,4,5; $date = DateTime->now->truncate(to => year); $set = DateTime::Event::Cron->from_cron(cron => $crontab, after => $date); # Rather than generating DateTime::Set objects, next/prev # calculations can be made directly: # Every day at 10am, 2pm, and 6pm. Reference date # defaults to DateTime->now. $crontab = 10,14,18 * * * *; $dtc = DateTime::Event::Cron->new_from_cron(cron => $crontab); $next_datetime = $dtc->next; $last_datetime = $dtc->previous; ... # List of DateTime::Event::Cron objects from # crontab file @dtc = DateTime::Event::Cron->new_from_crontab(file => /etc/crontab); # Full cron lines with user, such as from /etc/crontab # or files in /etc/cron.d, are supported and auto-detected: $crontab = * * * * * gump /bin/date; $dtc = DateTime::Event::Cron->new(cron => $crontab); # Auto-detection of users is disabled if you explicitly # enable/disable via the user_mode parameter: $dtc = DateTime::Event::Cron->new(cron => $crontab, user_mode => 1); my $user = $dtc->user; my $command = $dtc->command; # Unparsed original cron entry my $original = $dtc->original;.

Requirements: No special requirements
Platforms: Linux
Keyword: Cron Crontab Datetime Datetimeeventcron Generating Libraries Lines Programming Sets User
Users rating: 0/10

License: Freeware Size: 10.24 KB
More Reviews or Write Review

Email  -  randomsig for Email System Utilities 1.10.0
randomsig is a program for randomly generating signature lines for email messages.Usually this is done by reading in files and filtering out certain lines. It's especially interesting when it is configured to read from your mailbox.
20.48 KB  
Email  -  randomsig 1.10.0
randomsig is a program for randomly generating signature lines for email messages. Usually this is done by reading in files and filtering out certain lines. It's especially interesting when it is configured to read from your mailbox.
Programming  -  GCContourPlotter 1.0
CONREC is a popular algorithm used for generating contour lines from three-dimensional height data. While more sophisticated algorithms certainly exist, for many uses CONREC is perfectly adequate, and has the advantage of being easy to understand...
40.96 KB  
Development Editors  -  Generalized Interface Tool Kit 0.2.0
The GITK - Generalized Interface Tool Kit is a set of libraries, which form a (user) interface abstraction layer. This toolkit equips an application with adptable/adaptive interfaces, that are generated and executed by rendering modules.
1.12 MB  
Desktop Utilities  -  The DJ Project 1.0.2
The DJ Project is a set of tools and libraries to enhance the user experience of Java on the Desktop. The NativeSwing library allows an easy integration of some native components into Swing applications, and provides some native...
8.43 MB  
Libraries  -  App::datetime 0.964
App::datetime is a date and time considerations. Most Enterprise development includes processing of dates and times. There are many date and time modules on CPAN, and choosing the right one can be confusing. There are no special perl data types...
122.88 KB  
Libraries  -  Lingua::ZH::DateTime 0.01
Lingua::ZH::DateTime is a Perl module to convert time to chinese format. SYNOPSIS This module can convert asctime to chinese format in your locale. you can select china singapore hongkong taiwan locale and gb2312/big5 charset. asctime is ASC C...
3.07 KB  
Libraries  -  Data::Faker::DateTime 0.07
Data::Faker::DateTime is a Data::Faker plugin. DATA PROVIDERS unixtime Return a unix time (seconds since the epoch) for a random time between the epoch and now. date Return a random date as a string, using a random date format (see...
20.48 KB  
Libraries  -  Rose::DateTime 0.532
Rose::DateTime is a Perl module with DateTime helper functions and objects. SYNOPSIS use Rose::DateTime::Util qw(:all); $now = parse_date(now); $then = parse_date(12/25/2001 6pm); $date_text = format_date($then, "%D at %T %p"); ......
11.26 KB  
Libraries  -  JFreeChart 1.0.5
JFreeChart is a free Java class library for generating charts.. The official home page of the JFreeChart project.
2.9 MB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 3.15.3
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB