I have a crontab entry that will run a 'worker' script hourly. Within the 'worker' script I have multiple paths to other scripts like so;
#!/bin/bash
clear
echo "project-worker"
echo "Script to run checks on all jobs!"
source /home/user/project/project-jobs/cleanuptest1/project-mon-cleanuptest1.sh
source /home/user/project/project-jobs/sedtest1/project-mon-sedtest1.sh
jobslot=empty
exit
My issue is it only seems to be running the first script (cleanuptest1.sh) and ignoring the rest. Can anyone see where I'm going wrong at all? I read to call other scripts from within a script I should use source but is where I'm going wrong, it can't be used for multiple instances?
Many thanks in adavance!
sourceto run the scripts? Unless you need environment variables from those scripts in the main one, best practice would dictate that you use.instead.source/., you need to make sure the script isn't callingexit.exitfrom script? Do you think it will be exiting the shell before the scripts finish? Just curious why I should remove it?sourcecall.