nohup not generating/updating nohup.out from cron

  • Follow


Hi..All,

  I have a shell script "main.sh" which in turns runs another shell 
script in a nohup mode. All the env variables are set properly.

Main.sh
---------
PATH=.....
HOME=.....
nohup ./another.sh &

When I run it from command line it does create the nohup.out in the 
$HOME  & updates it with the debug messages from "another.sh" . But if I 
add it to the cronjob it doesn't create/update the nohup.out

What do I need to do to fix this.

TIA

P

0
Reply Praveen 4/1/2006 12:41:38 AM

The nohup file will be created in the current working
directory of the process. Not $HOME.  Perhaps you should
look elsewhere in the filesystem.

0
Reply greek_philosophizer 4/1/2006 4:55:26 PM


greek_philosophizer@hotmail.com wrote:
> The nohup file will be created in the current working
> directory of the process. Not $HOME.  Perhaps you should
> look elsewhere in the filesystem.
> 


Hi..Greek,

   Thanks. But in the script I do
cd /<main_dir>/required_working_directory in the beginning of the shell 
script.

so do you mean in the cron job do I have to still execute it like

crontab
-------
* * * *  (cd <required_folder> ; ./main.sh ; )




Regards

P

0
Reply Praveen 4/1/2006 8:35:42 PM

2 Replies
839 Views

(page loaded in 0.055 seconds)

Similiar Articles:






7/20/2012 9:52:59 AM


Reply: