Hi all,
I have a postprocessing bash script I would like to execute once the UEMS run finishes. How can I add it to the autorun script?
Added bash script?
Added bash script?
---
Geophysics Department
University of Concepcion, Chile
Geophysics Department
University of Concepcion, Chile
Re: Added bash script?
Hi Andrés,
don´t include your script in autorun. Use cron instead.
Luis
don´t include your script in autorun. Use cron instead.
Luis
Re: Added bash script?
Hi Luis,
I am doing that now. But the finishing time of the forecast changes a bit. How can I run the next script right after the autorun?
I am doing that now. But the finishing time of the forecast changes a bit. How can I run the next script right after the autorun?
---
Geophysics Department
University of Concepcion, Chile
Geophysics Department
University of Concepcion, Chile
Re: Added bash script?
Just take the longest run and then start cron a few minutes later
Luis
Luis
-
- Posts: 1604
- Joined: Wed Aug 19, 2009 10:05 am
Re: Added bash script?
How does your cron entry look like?
Re: Added bash script?
The quasi-standard
30 02 * * * /home/wrf/uems/strc/Ubin/uems_autorun-wrapper.csh --rundir /home/wrf/uems/runs/Coronel > /home/wrf/uems/logs/ems_autorun.log 2>&1 &
30 02 * * * /home/wrf/uems/strc/Ubin/uems_autorun-wrapper.csh --rundir /home/wrf/uems/runs/Coronel > /home/wrf/uems/logs/ems_autorun.log 2>&1 &
---
Geophysics Department
University of Concepcion, Chile
Geophysics Department
University of Concepcion, Chile
-
- Posts: 1604
- Joined: Wed Aug 19, 2009 10:05 am
Re: Added bash script?
Try
Or if that doesn't work for some reason (didn't tested) then edit /home/wrf/uems/strc/Ubin/uems_autorun-wrapper.csh and call your script from the end of that one but this might be overwritten with UEMS update (again not sure).
Code: Select all
30 02 * * * /home/wrf/uems/strc/Ubin/uems_autorun-wrapper.csh --rundir /home/wrf/uems/runs/Coronel > /home/wrf/uems/logs/ems_autorun.log && /path/to/your/additional/srcipt.sh 2>&1 &
-
- Posts: 9
- Joined: Tue Sep 25, 2018 6:32 pm
Re: Added bash script?
First run your auto script at least 3 or 5 times to know the longest run, then
remember when using crontab you should use absolut paths
Code: Select all
30 02 * * * /home/user/Documents/auto_script.sh > /home/user/Documents/cron.log 2>&1