#! /usr/bin/env php . chdir("html/ops"); require_once("../inc/boinc_db.inc"); chdir("../.."); // script to let transitioners catch up, then run start function catchup() { while (1) { $now = time(); $wus = BoincWorkunit::enum("transition_time<$now limit 1"); if (count($wus) == 0) break; echo "Some WUs need transition - running transitioner.\n"; $ret = system("bin/transitioner --one_pass"); echo "ret: $ret\n"; sleep(1); } echo "Transitioner is caught up.\n"; } catchup(); ?>