Skip to content

Instantly share code, notes, and snippets.

@jagroop jagroop/_3_30_am.php
Last active Nov 17, 2017

What would you like to do?
Cron jobs Logics
// 3:30 AM Cron job
public function threeAMCron()
$this->db->where_in('id', [14, 60]);
$this->db->where("date_format(CONVERT_TZ(NOW(), 'UTC', local_tz), '%H:%i') = '15:30'");
$users = $this->db->get('users')->result();
foreach ($users as $key => $user) {
$this->notification->send($user, [
'from_id' => $user->id,
'message' => "2 PM Notification test, please take a screen shot.",
'type' => 'inactive_trackee'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.