Find the answer to your Linux question:
Results 1 to 3 of 3
why ""nohup" is not working on cron job?? i wants to call a script using nohup from the script added to the cron job any idea??...
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    8

    nohup in cron

    why ""nohup" is not working on cron job??
    i wants to call a script using nohup from the script added to the cron job

    any idea??

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Why do you need to run the script under nohup? Scripts and applications that are started under cron are already detached from stdin/stdout/stderr so nohup should not be required.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    8
    i installed asterisk telephony system on centos OS, so i uses nohup for restarting the asterisk or to download a stream using mplayer like that:

    in the main script:
    nohup /radioBBC/down.sh &
    and the script down.sh contains the following:

    #!/bin/sh -xv
    mplayer -quiet -vo null -vc dummy -af channels=1,volume=0,resample=8000:0:1 -ao pcm:waveheader:file="/var/lib/asterisk/moh/BBC/rawaudio.wav" "mms://a294.l3944042293.c39440.g.lm.akamaistream.net/D/294/39440/v0001/reflector:42293"
    if i put the mplayer command in the main script, it will not continues running and will stop at the mplayer command, so i have used the nohup option

    is there a method to combine all commands in the same script??

Posting Permissions

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