Location: PHPKode > projects > JobAppr > Jobappr-1.4/admin/cron.php
<?php

require_once('../includes/functions.php');
require_once('inc/admin-functions.php');

$duration = meta('job_duration_days');
$today = date("Y-m-d, H:i:s");

if ($duration == 0) {
	exit;	
}

$select = "SELECT job_id,created FROM ".TB_JOBS." WHERE preview IS NOT NULL AND completed IS NOT NULL AND expired IS NULL";
$data = mysql_query($select);
$count = mysql_num_rows($data);	
while($job = mysql_fetch_assoc($data)) {

	$status = is_it_expired(date("Y-m-d, H:i:s", convert_datetime($job['created'])),$duration);
	if ($status) {
		echo 'Expired: '.$job['job_id'].'<br />';
		mysql_query("UPDATE ". TB_JOBS ."	SET expired='".$today."' WHERE job_id='".$job['job_id']."'");
	}
}

Return current item: JobAppr