Scheduler Module goes Blank

I am using 7.10 on-demand and when i upload my module with module loader and install it my Scheduler goes blank and i can't see it until i uninstall it. I searched on this forum and some say that its because there is a logic flaw in my code. can someone point that out? thanks beforehand.

code:

function lftm_it_late_task_job() {

$builder = $GLOBALS['db']->getConnection()->createQueryBuilder();
$builder->select('id')
->from('tasks')
->where('deleted = 0')
->andwhere('DATE(NOW) > DATE_ADD(date_due, INTERVAL 1 HOUR)');

$stmt = $builder->execute();

foreach($stmt->fetchAll() as $row) {
$id = $row['id'];

$task = BeanFactory::retrieveBean('Tasks', $id, array('disable_row_level_security' => true));

if (isset($task) && isset($task -> id) && !empty($task -> id)) {

if($task->it_late_c != true) {
$task->it_late_c = true
}

}

}

return true
}

ps: it_late_c is a checkbox field