Replaced cron logic with crude but robust approach.