forked from ictinnovations/ictcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.php
executable file
·35 lines (28 loc) · 1.06 KB
/
cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/* * ***************************************************************
* Copyright © 2014 ICT Innovations Pakistan All Rights Reserved *
* Developed By: Nasir Iqbal *
* Website : http://www.ictinnovations.com/ *
* Mail : [email protected] *
* *************************************************************** */
use ICT\Core\Service;
use ICT\Core\Task;
// default include is /usr/ictcore/core
chdir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'core');
include_once "Core.php";
function cron_process()
{
// process all pending retries
Task::process_all();
// execute reload method for all available services
// it will restart gateway in case there are new configurations
$listService = Service::load_all();
foreach ($listService as $oService) {
$oService->config_update();
}
// execute email fetch script
// nothing special we just need to include it for execution
include_once('../bin/sendmail/gateway.php');
}
cron_process();
exit();