I\'m new to using cron job. I don\'t even know how to write it. I have tried to search from internet, but I still don\'t understand it well. I want to create a cron job that
function _cron_exe($schedules) {
if ($obj->get_option('cronenabledisable') == "yes") {
// $interval = 1*20;
$interval = $obj->get_option('cronhowtime');
if ($obj->get_option('crontiming') == 'minutes') {
$interval = $interval * 60;
} else if ($obj->get_option('crontiming') == 'hours') {
$interval = $interval * 3600;
} else if ($obj->get_option('crontiming') == 'days') {
$interval = $interval * 86400;
}
$schedules['hourlys'] = array(
'interval' => $interval,
'display' => 'cronjob'
);
return $schedules;
}
}