Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 23 of 23
Originally Posted by Rubberman Try running it from the cron tab as a background nohup process. A lot of programs will terminate if they have no input/output streams (stdin, stdout, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16

    Quote Originally Posted by Rubberman View Post
    Try running it from the cron tab as a background nohup process. A lot of programs will terminate if they have no input/output streams (stdin, stdout, stderr) attached, which is usually the case in cronjobs unless you deliberately redirect those streams. IE, the process gets the SIGHUP (hangup) signal and terminate. nohup masks that.
    oh man, now you lost me lol. how do I run it as a bg nohup process?


    (ps I'm from chicago too, I really appreciate you putting up with my amateur linux'ing.)

  2. #22
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    From the nohup man page:
    Code:
    DESCRIPTION
           Run COMMAND, ignoring hangup signals.
    
           --help display this help and exit
    
           --version
                  output version information and exit
    
           If  standard  input is a terminal, redirect it from /dev/null.  If standard output is a terminal, append output
           to ‘nohup.out’ if possible, ‘$HOME/nohup.out’ otherwise.  If standard error is a terminal, redirect it to stan-
           dard output.  To save output to FILE, use ‘nohup COMMAND > FILE’.
    
           NOTE:  your  shell  may  have  its  own  version of nohup, which usually supersedes the version described here.
           Please refer to your shell’s documentation for details about the options it supports.
    So, your crontab would look like this:
    Code:
    SHELL=/bin/bash
    00 04 * * * nohup /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf >/dev/null 2>/dev/null &
    Change the output to /dev/null to specific files if you want to preserve normal and error output.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #23
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    ok simple enough, I'll give that a try. thanks again

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •