Created
August 29, 2013 11:26
-
-
Save mlebkowski/6376901 to your computer and use it in GitHub Desktop.
daily_4am
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOMAINS=$(grep "DOMAIN" $( grep --color=none -L 'SITE_ENABLED: false' ../config/lang-*.yaml ) | awk '{ print "www."$2; }') | |
for HOST in $DOMAINS; | |
do | |
#################### | |
export ZL_HOST=$HOST | |
#################### | |
/usr/bin/php import_doctors2.php & | |
done | |
pids=$(ps --ppid $$ -o pid --no-headers) | |
while [ $(ps -p $( echo $pids | sed 's/ /,/g') --no-headers | wc -l ) -gt 0 ] ; | |
do | |
sleep 1; | |
done | |
# for domains with .com we have to add www. suffix | |
for HOST in $DOMAINS; | |
do | |
#################### | |
export ZL_HOST=$HOST | |
#################### | |
/usr/bin/php rating.php doctor & | |
/usr/bin/php rating.php facility & | |
/usr/bin/php opinion_unconfirmed_email.php & | |
/usr/bin/php import_google_analytics_data.php & | |
/usr/bin/php doctor_verify_email.php & | |
/usr/bin/php object_rank.php & | |
/usr/bin/php calculate_daily_site_stats.php & | |
done | |
pids=$(ps --ppid $$ -o pid --no-headers) | |
while [ $(ps -p $( echo $pids | sed 's/ /,/g') --no-headers | wc -l ) -gt 0 ] ; | |
do | |
sleep 1; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment