Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6644021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:07:07+00:00 2026-05-26T00:07:07+00:00

Wondered if anyone had any idea why the following problem is occurring, or had

  • 0

Wondered if anyone had any idea why the following problem is occurring, or had any tips where to look…I can run the shell script manually in ssh, but if I set it up to run in crontab i get the problems below.

Server is: FreeBSD 8, and I have access to all root permissions

I have a shell script (Bourne) that runs under the “root” permissions using crontab with the following command:

* * * * * /data/backups/scripts/server_log_check.sh > /data/backups/logs/cron_logs/server_log_check.sh_cron.log

The “server_log_check.sh” script checks to see if “the report server” is running with this command:

if ps -xauww | grep -v grep | grep java | grep www > /dev/null
            then 
                            #“reports are running, no need to try to restart it”
            Else
                            /usr/local/etc/rc.d/tomcat55 start     #start report server because it is not running
            Fi

The problem is occurring on this line: “/usr/local/etc/rc.d/tomcat55 start”, when the script is run using crontab, but if I run the script manually via ssh this line of code runs without a problem, but all the rest of the code in the script executes fine, just not this line. Allternatively, if I paste this line /usr/local/etc/rc.d/tomcat55 start into the ssh command prompt, it runs just fine too.

I changed the “server_log_check.sh” ownership to be “root”, but that didn’t make a difference, and the script “tomcat55” ownership is “www”. The crontab entry is being made under the “Root” profile, so, I assumed there is no problem running a file that is owned by a lessor permission such as “www” has

Do you have any ideas why cron is doing this?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:07:08+00:00Added an answer on May 26, 2026 at 12:07 am

    Try adding the following which will add the error to the log file as well:

    * * * * * /data/backups/scripts/server_log_check.sh > /data/backups/logs/cron_logs/server_log_check.sh_cron.log 2>&1
    

    Also change this:

    /usr/local/etc/rc.d/tomcat55 start  
    

    to:

    cd /home/root
    
    nohup /usr/local/etc/rc.d/tomcat55 start &
    

    This should create a nohup.out in /home/root.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking of writing a new web-based game, and wondered if anyone had any
I'm having the following problem and wondered whether anyone could see why this is
I wondered if anyone else had come across this problem. When I originally build
Wondered if anyone had any links to a tutorial for a navigation bar in
I’m guessing not, but I wondered if anyone had any experience. I imagine it
I'm running in to a couple of issues and wondered if anyone had any
I just wondered if anyone knew of a simple script available that will do
I'm having a little trouble attacking this problem and wondered if anyone could push
I wondered if anyone can help me out - I'm attempting to load a
I wondered if anyone could shed some light on the way in which layers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.