}
//end if
$time = time();
$one_month_ago = strtotime('-1 month');
$sql = "SELECT * FROM v_emp_clearance_candidates";
if ($results = PSU::db('banner')->Execute($sql)) {
    foreach ($results as $row) {
        if ($checklist = HRChecklist::get($row['pidm'], 'employee-exit')) {
            if ($checklist['position_code'] == $row['position_code'] && strtotime($checklist['activity_date']) >= $one_month_ago) {
                continue;
            }
            //end if
        }
        //end if
        $person = PSUPerson::get($row['pidm']);
        $response = HRChecklist::start($person->pidm, strtotime($row['end_date']), 'employee-exit', $row['position_code'], 0);
        $checklist_id = $response->id;
        if ($checklist_id) {
            HRChecklist::email($person, strtotime($row['end_date']), 'ape_checklist_employee_exit', 2, 'employee-exit', $checklist_id, $response);
        }
        //end if
    }
    //end foreach
}
//end if
if ($command_line) {
    $cron->stopTimer();
    $cron->log('Employee Exit Checklist Trigger completed (Run Time: ' . $cron->getRunTime() . ')');
    $cron->unlock();
}
//end if