Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 23
ok yes.I see that file. it reads exactly what appears in crontab -e (or -l) SHELL=bin/bash 00 04 * * * /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf so you are telling me "SHELL=bin/bash" 00 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16

    ok yes.I see that file.

    it reads exactly what appears in crontab -e (or -l)

    SHELL=bin/bash

    00 04 * * * /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf


    so you are telling me

    "SHELL=bin/bash"

    00 04 * * * /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf

    will work?

  2. #12
    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
    Sorry no - I edited my post - mistyped. It should be:
    Code:
    SHELL=/bin/bash
    
    00 04 * * * /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #13
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    thats exactly what I have

  4. #14
    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
    No, you have:
    Code:
    SHELL=bin/bash
    
    00 04 * * * /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf
    The slash before bin/bash is missing, at least in your example.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #15
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    OHHHH ok thanks. man if its that simple I'm going to shoot myself in the knee caps

    edit, damnit. it is in there correctly. I just left it out when I typed in on the forum.

    HTML Code:
    SHELL=/bin/bash
    
    00 04 * * * /home/mystuff/programs/bin/psProgram /home/mystuff/program/conf/1.psProgram.conf

  6. #16
    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
    Ok. What does this program do? As I asked earlier, does it generate output, and how do you know it didn't work?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #17
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    the program run a monitoring program of sorts. yes, an executable. I know it doesn't work because I cant launch the monitor from other machines. everything works fine when I run it manually. (from bin) ./psProgram ../conf/1.psProgram

    I was going to set the cron to generate output by doing this var/log/script_output.log 2>&1

  8. #18
    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
    So, let's step back a bit. It sounds like you have two problems with this monitoring program:

    1. You want to, but can't invoke it from a remote machine.
    2. You want to invoke it periodically on your system using cron.

    If this is correct, then I need some more information from you. IE,

    1. How are you trying to invoke it remotely?
    2. What does the program do, and does it generate output, or does it open/write to log files directly.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #19
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    the program is an alerts monitor. when launched, other software processes connect to it for monitoring purposes. from remote windows machines, I launch a gui that shows all the processes connected.

    but I'm kind of curious why it matters. I know for a fact the program is running and works when I run it manually. I see it running when I ps -a. but when I cron it, as shown, it never appears when I ps -a.

  10. #20
    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
    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.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

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