Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Need help on tomcat restart via cronjob

by McA (Curate)
on Oct 30, 2013 at 10:21 UTC ( #1060312=note: print w/ replies, xml ) Need Help??


in reply to Need help on tomcat restart via cronjob

Hi,

IMHO not really a Perl related question. It's more one of the recurring questions, why a script is not working under cron when it is working in a terminal. And this has to do almost always with environment variables not being set properly while running under cron.

IMHO the simplest solution for that is calling the job in cron this way:

bash -l -c "perl $path_to_perlscript/someperlscript.pl arg1 arg2"

UPDATE: This shall show the idea behind. It depends on the shell used.

Best regards
McA


Comment on Re: Need help on tomcat restart via cronjob
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060312]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2014-10-25 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls