I have a Perl Module that i created and i want to run one of the subroutine in it on a schedule. I know I can just make a small perl script that calls the subroutine and call it from the crontab but if there is a way to call the subroutine right from the crontab that would be cool!
Is this possible?
You can use Perl’s
-eswitch for executing code from the command line, e.g.Make that even shorter with the
-Mswitch for loading a module:The perlrun man page is your friend.