steves has asked for the wisdom of the Perl Monks concerning the following question:
Has anyone used DateTime::Event::Cron?
It looks useful but I got hung up immediately on some basics. This code should, I think, show me each crontab entry, then show me just the command:The full entry prints fine, but the commands are all missing the leading token of the command (the program name) -- only the command arguments are shown. I believe all of the commands are full paths and therefore contain forward slashes. Some of the docs. point to an expanded cron syntax that supports slashes, so I'm wondering if maybe that has something to do with it.use strict; use DateTime::Event::Cron; my @entries = DateTime::Event::Cron->new_from_crontab (file => '/tmp/crontab.out'); my $entry; foreach $entry (@entries) { print $entry->original(), "\n"; print " ", $entry->command(), "\n"; }
At any rate, I'd be interested to hear other monks' experience with this module.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DateTime::Event::Cron
by Anonymous Monk on Dec 19, 2004 at 05:03 UTC | |
Re: DateTime::Event::Cron
by mojotoad (Monsignor) on Dec 21, 2004 at 04:28 UTC | |
Re: DateTime::Event::Cron
by steves (Curate) on Dec 19, 2004 at 11:01 UTC |
Back to
Seekers of Perl Wisdom