in reply to Trouble finding modules from cron
Knowing this will probably happen again i would make a script called /usr/bin/perlcron
and chmod ugo+x it. Then when you enter your command to be run by cron just preface it with /usr/bin/perlcron. ie "/usr/bin/perlcron myscript". This has the advantage that you can also do things like setup a special path when your path is not the path that cron uses. That way you dont need to add any special code to your scripts, it is taken care of in perlcron. And the next time you want to run a perl script by cron you are all set to go,, just use perlcron again to start it#!/bin/sh perl -I /some/special/libpath:/another/special/libpath "$@"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Trouble finding modules from cron
by Your Mother (Archbishop) on Apr 11, 2017 at 18:07 UTC | |
Re^2: Trouble finding modules from cron
by afoken (Chancellor) on Apr 13, 2017 at 04:30 UTC | |
Re^2: Trouble finding modules from cron
by faineant (Beadle) on Apr 12, 2017 at 19:11 UTC | |
by huck (Prior) on Apr 12, 2017 at 19:22 UTC | |
by cbeckley (Curate) on Apr 12, 2017 at 19:53 UTC |
In Section
Seekers of Perl Wisdom