Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Need help on tomcat restart via cronjob

by derby (Abbot)
on Oct 30, 2013 at 10:27 UTC ( #1060315=note: print w/replies, xml ) Need Help??

in reply to Need help on tomcat restart via cronjob

Probably not a perl problem but either a sudo permission problem or an environment variable problem.

  • What account is kicking off the crontab? A users or roots? If a user, does that user have sudo permissions -- if it's roots crontab, you don't need to sudo at all.
  • There may be environment variables (JAVA_HOME and PATH come to mind) that are set when you kick off from the command line but are not present in the cron environment. Tomcat ( will invoke the script in order to set environment variables. By default that script is either blank or not there. Just create it and and your needed env settings there.

  • Comment on Re: Need help on tomcat restart via cronjob

Replies are listed 'Best First'.
Re^2: Need help on tomcat restart via cronjob
by SriniK (Beadle) on Oct 30, 2013 at 10:46 UTC
    I am running the script from root user the below are the evs from the script
    HOME : /root CVS_RSH : ssh DISPLAY : :99 LESSOPEN : |/usr/bin/ MAIL : /var/spool/mail/root PWD : /root LANG : en_US.UTF-8 USER : root G_BROKEN_F: 1 LOGNAME : root SHLVL : 2 HOSTNAME : ***.****.****.** JAVA : /usr/bin/ _ : /bin/env PATH : /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/b +in:/root/bin SHELL : /bin/sh HISTSIZE : 1000 HISTCONTRO: ignoredups

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-12-10 01:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found