Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Execute a job only when the previous has finished

I have a bash script which has a sqoop exec and after it three impala commands. I want to run it but only when the previous execution has finished. Is this possible to be done in cronjob or in oozie ?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I assume you are in a linux environment so you should be able to use the run-one command ( ubuntu run-one ) in conjunction with you bash script in a crontab.

e.g.

* * * * * cd /path/to/your/script && run-one ./your-script.sh

If not available you should be able to install if with your package manager

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading