Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2007
cronjob - shell script related problem
Somebody suggested that I should dump the commands into a shell script and then run a single cronjob against the shell script. Now I do not know how the shell script execution 'behaves' in regards to execution. Let's say I list my 20 crons one after another. How is that being executed? Does the script executes line 1 first and waits for the success message and then moves to line 2 and so on? Or what better way can I use to run my cronjobs? Here is an example of my jobs:
25 18 * * 5 /usr/local/v-backup/v-backup.pl -c /usr/local/v-backup/app-1-backup.cfg > /var/log/vbackup/app-1-backup.log
55 18 * * 5 /usr/local/v-backup/v-backup.pl -c /usr/local/v-backup/app-2-backup.cfg > /var/log/vbackup/app-2-backup.log
25 19 * * 5 /usr/local/v-backup/v-backup.pl -c /usr/local/v-backup/app-3-backup.cfg > /var/log/vbackup/app-3-backup.log
and so on ....
- Join Date
- Nov 2004
Shell scripts can run commands either. Just the command, like so:
/usr/bin/something --run-first && /usr/bin/something --run-second && /usr/bin/something --run-third