Skip to content

Instantly share code, notes, and snippets.

@mlebkowski
Created August 29, 2013 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlebkowski/6376901 to your computer and use it in GitHub Desktop.
Save mlebkowski/6376901 to your computer and use it in GitHub Desktop.
daily_4am
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