I have a bash script which activates the anaconda environment and run a python scheduler script and write logs to a file every minute. It is working perfectly fine if I run just the script.
[user@host proj]$ test.sh
After doing ctrl-C, I see the logs are coming every minute.
[user@host proj]$ cat logs/log.log
Test job 1 executed at : 2018-10-09 14:16:00.000787
Test job 1 executed at : 2018-10-09 14:17:00.001890
Test job 1 executed at : 2018-10-09 14:18:00.001861
But when I run same script in background with nohup
[user@host proj]$ nohup test.sh &
[1] 24884
[user@host proj]$ nohup: ignoring input and appending output to ‘nohup.out’
I can see with top that script and python are running
24949 user  20   0  113172   1444   1216 S  0.0  0.0   0:00.00 test.sh
24952 user  20   0  516332  66644  17344 S  0.0  0.8   0:00.65 python
But I cannot see anything to be written in log file.
Not sure what is going wrong. Any suggestion to guide me in correct direction is highly appreciated.
 
     
    
 
    