Subject: | Additional functionality suggestions |
Date: | Mon, 9 Nov 2009 14:41:29 -0800 (PST) |
To: | bug-Schedule-Cron [...] rt.cpan.org |
From: | DVK <dvk_mail [...] yahoo.com> |
Roland, this is more of a wishlist than a bug report.
It is based on the following StackOverflow question, which I attempted to answer based on your module.
http://stackoverflow.com/questions/1704084/crontab-report-of-what-runs-in-a-specified-start-and-end-datetime/1704388#1704388
The wishlist is mostly to allow emulation of crontab (as opposed to actually running it) to see what WOULD HAVE BEEN ran.
Improvements - most of which seem very simple - are:
1) FAST-FORWARD mode (specified in constructor)
-- Ability to supply start/end time for fast-forward in constructor
-- "$now=time;" replaced with $now++ in FF mode.
the very first assignment should be from start_time mentioned in last bullet point
-- sleep($sleep) replaced with NO-OP in FF mode
-- every loop, check if $now reached end_time and if so, quit.
2) "read real crontab" mode.
-- Ability to read "real" crontab file (or crontab -l output)
-- Ability to automatically make the entries subroutines by either printing the commands listed in real crontab for FF mode, or by actually running them via system() call.
Thanks!