perhaps Time.now.to_i should be a default on the start_time argument to entity_check.end_unscheduled_maintenance ?