#!/bin/bash
: ${interval:=1800}
while date; do
	echo "maintbot ..."
	sudo -u "maintbot" ./check_maintenance_incidents.py "$@" review
	echo "factory-source ..."
	sudo -u "factory-source" ./check_source_in_factory.py "$@" review
	read -t "$interval" -p "done. sleeping. press enter to check immediately"
	[ "$?" -eq 0 ] || echo
	[ "$REPLY" != 'q' ] || break
done
