Hi Steve,

I'm not sure exactly why your entries are tripping up the module -- could you please send along an example line from the crontab in question (doctor it up if there's anything private in it).

I do suspect what's happening, though -- the module attempts to automatically detect when user names are present in the crontab file and adjust accordingly (such as with the system cron files in Linux ... /etc/crontab). Somehow that's getting tricked.

So disable it in your case. Try this:

my @entries = DateTime::Event::Cron->new_from_crontab (
 file => '/tmp/crontab.out',
 user_mode => 0
);

Let me know if that works.

Cheers,
Matt

Steve Sapovits wrote:


On Solaris 2.7, I only get command arguements -- not the whole command -- if I do this:

  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";
  }

I get the whole crontab line, followed by the command
arguments only; i.e., the program name is missing.

All program names are full paths.

Any ideas why this isn't working as I'd expect?  Or am
I missing something?




Reply via email to