Runjobs

From BITPlan Wiki
Revision as of 14:15, 31 July 2025 by Wf (talk | contribs) (Created page with "<source lang='bash'> #!/bin/bash # WF 2015-06-08 # run jobs for all sites jobs=$(pgrep -fla runjobs | wc -l) if [ $jobs -gt 3 ] then echo "$jobs runjobs already running ..."...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#!/bin/bash
# WF 2015-06-08
# run jobs for all sites
jobs=$(pgrep -fla runjobs | wc -l)
if [ $jobs -gt 3 ]
then
  echo "$jobs runjobs already running ..."
  exit 1
fi
cd /srv/www/mediawiki/code
host=$(hostname)
cat $host.sites | egrep -v "^#"  | while read siteid site
do
  #./update $siteid
  #echo $siteid
  #echo $site
  /usr/bin/php /srv/www/mediawiki/code/worksite.php $site runJobs \
  --conf /srv/www/mediawiki/sites/$site/FullLocalSettings.php >> /var/log/mediawiki/runJobs_$siteid.log 2>&1
done