当前位置: 首页>>代码示例>>PHP>>正文


PHP Scheduler::save方法代码示例

本文整理汇总了PHP中Scheduler::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Scheduler::save方法的具体用法?PHP Scheduler::save怎么用?PHP Scheduler::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Scheduler的用法示例。


在下文中一共展示了Scheduler::save方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addAODSchedulers

function addAODSchedulers()
{
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    $scheduler->retrieve_by_string_fields(array('job' => 'function::aodIndexUnindexed'));
    if ($scheduler->id == '') {
        $scheduler->name = "Perform Lucene Index";
        $scheduler->date_time_start = "2005-01-01 11:15:00";
        $scheduler->date_time_end = null;
        $scheduler->job_interval = "0::0::*::*::*";
        $scheduler->job = "function::aodIndexUnindexed";
        $scheduler->status = "Active";
        $scheduler->catch_up = 1;
        $scheduler->save();
    }
    $scheduler = new Scheduler();
    $scheduler->retrieve_by_string_fields(array('job' => 'function::aodOptimiseIndex'));
    if ($scheduler->id == '') {
        $scheduler->name = "Optimise AOD Index";
        $scheduler->date_time_start = "2005-01-01 11:15:00";
        $scheduler->date_time_end = null;
        $scheduler->job_interval = "0::*/3::*::*::*";
        $scheduler->job = "function::aodOptimiseIndex";
        $scheduler->status = "Active";
        $scheduler->catch_up = 1;
        $scheduler->save();
    }
}
开发者ID:BMLP,项目名称:memoryhole-ansible,代码行数:28,代码来源:AdvancedOpenDiscovery.php

示例2: addAODSchedulers

function addAODSchedulers()
{
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    if (!count($scheduler->get_full_list('', 'job = "function::aodIndexUnindexed"'))) {
        $scheduler->name = "Perform Lucene Index";
        $scheduler->date_time_start = "2005-01-01 11:15:00";
        $scheduler->date_time_end = null;
        $scheduler->job_interval = "0::0::*::*::*";
        $scheduler->job = "function::aodIndexUnindexed";
        $scheduler->status = "Active";
        $scheduler->catch_up = 1;
        $scheduler->save();
    }
    $scheduler = new Scheduler();
    if (!count($scheduler->get_full_list('', 'job = "function::aodOptimiseIndex"'))) {
        $scheduler->name = "Optimise AOD Index";
        $scheduler->date_time_start = "2005-01-01 11:15:00";
        $scheduler->date_time_end = null;
        $scheduler->job_interval = "0::*/3::*::*::*";
        $scheduler->job = "function::aodOptimiseIndex";
        $scheduler->status = "Active";
        $scheduler->catch_up = 1;
        $scheduler->save();
    }
}
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:26,代码来源:AdvancedOpenDiscovery.php

示例3: updateScheduler

function updateScheduler()
{
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    $schedulers = $scheduler->get_full_list('', 'job = "function::pollMonitoredInboxesCustomAOP"');
    foreach ($schedulers as $scheduler) {
        $scheduler->job = "function::pollMonitoredInboxesAOP";
        $scheduler->save();
    }
}
开发者ID:JimMackin,项目名称:SuiteCRM-Build-Maker,代码行数:10,代码来源:AdvancedOpenPortal.php

示例4: install_aor

function install_aor()
{
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    $scheduler->retrieve_by_string_fields(array('job' => 'function::aorRunScheduledReports'));
    if ($scheduler->id == '') {
        $scheduler->name = "Run Scheduled Reports";
        $scheduler->date_time_start = "2005-01-01 11:15:00";
        $scheduler->date_time_end = null;
        $scheduler->job_interval = "*::*::*::*::*";
        $scheduler->job = "function::aorRunScheduledReports";
        $scheduler->status = "Active";
        $scheduler->catch_up = 1;
        $scheduler->save();
    }
}
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:16,代码来源:AdvancedOpenReports.php

示例5: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Scheduler();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     //Save task to database
     if (isset($_POST['Scheduler'])) {
         $model->attributes = $_POST['Scheduler'];
         if (count($_POST['Scheduler']['tbl_schedule_recurring']) > 0) {
             $model->tbl_schedule_recurring = implode(',', $_POST['Scheduler']['tbl_schedule_recurring']);
         }
         if ($model->save()) {
             //create crontab schedule
             $this->generateAllcronjobs();
             $this->redirect(array('admin'));
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:chrisjongo,项目名称:lights-control,代码行数:23,代码来源:SchedulerController.php

示例6: AddScheduler

function AddScheduler()
{
    include_once 'install/install_utils.php';
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    $scheduler->retrieve_by_string_fields(array('job' => 'function::processAOW_Workflow'));
    if ($scheduler->id == '') {
        $scheduler->name = 'Run AOW WorkFlow';
        $scheduler->job = 'function::processAOW_Workflow';
        $scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
        $scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
        $scheduler->job_interval = '*::*::*::*::*';
        $scheduler->status = 'Active';
        $scheduler->created_by = '1';
        $scheduler->modified_user_id = '1';
        $scheduler->catch_up = '0';
        $scheduler->save();
    }
}
开发者ID:BMLP,项目名称:memoryhole-ansible,代码行数:19,代码来源:AdvancedOpenWorkflow.php

示例7: updateScheduler

function updateScheduler()
{
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    if (count($scheduler->get_full_list('', "job = 'function::pollMonitoredInboxesAOP'"))) {
        return;
    }
    $scheduler->name = "AOP Check Inbound Mailboxes";
    $scheduler->date_time_start = "2005-01-01 11:15:00";
    $scheduler->date_time_end = "2020-12-31 00:00:00";
    $scheduler->job_interval = "*/1::*::*::*::*";
    $scheduler->job = "function::pollMonitoredInboxesAOP";
    $scheduler->status = "Active";
    $scheduler->catch_up = 0;
    $scheduler->save();
    $oldSchedules = $scheduler->get_full_list('', "job = 'function::pollMonitoredInboxes'");
    foreach ($oldSchedules as $oldSchedule) {
        $oldSchedule->status = "Inactive";
        $oldSchedule->save();
    }
}
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:21,代码来源:AdvancedOpenPortal.php

示例8: rebuildDefaultSchedulers

 /**
  * Archives schedulers of the same functionality, then instantiates new
  * ones.
  */
 function rebuildDefaultSchedulers()
 {
     global $mod_strings;
     // truncate scheduler-related tables
     $this->db->query('DELETE FROM schedulers');
     $sched3 = new Scheduler();
     $sched3->name = $mod_strings['LBL_OOTB_TRACKER'];
     $sched3->job = 'function::trimTracker';
     $sched3->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched3->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched3->job_interval = '0::2::1::*::*';
     $sched3->status = 'Active';
     $sched3->created_by = '1';
     $sched3->modified_user_id = '1';
     $sched3->catch_up = '1';
     $sched3->save();
     $sched4 = new Scheduler();
     $sched4->name = $mod_strings['LBL_OOTB_IE'];
     $sched4->job = 'function::pollMonitoredInboxes';
     $sched4->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched4->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched4->job_interval = '*::*::*::*::*';
     $sched4->status = 'Active';
     $sched4->created_by = '1';
     $sched4->modified_user_id = '1';
     $sched4->catch_up = '0';
     $sched4->save();
     $sched5 = new Scheduler();
     $sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
     $sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
     $sched5->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched5->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched5->job_interval = '0::2-6::*::*::*';
     $sched5->status = 'Active';
     $sched5->created_by = '1';
     $sched5->modified_user_id = '1';
     $sched5->catch_up = '1';
     $sched5->save();
     $sched6 = new Scheduler();
     $sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
     $sched6->job = 'function::runMassEmailCampaign';
     $sched6->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched6->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched6->job_interval = '0::2-6::*::*::*';
     $sched6->status = 'Active';
     $sched6->created_by = '1';
     $sched6->modified_user_id = '1';
     $sched6->catch_up = '1';
     $sched6->save();
     $sched7 = new Scheduler();
     $sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
     $sched7->job = 'function::pruneDatabase';
     $sched7->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched7->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched7->job_interval = '0::4::1::*::*';
     $sched7->status = 'Inactive';
     $sched7->created_by = '1';
     $sched7->modified_user_id = '1';
     $sched7->catch_up = '0';
     $sched7->save();
     $sched12 = new Scheduler();
     $sched12->name = $mod_strings['LBL_OOTB_SEND_EMAIL_REMINDERS'];
     $sched12->job = 'function::sendEmailReminders';
     $sched12->date_time_start = create_date(2008, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched12->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched12->job_interval = '*::*::*::*::*';
     $sched12->status = 'Active';
     $sched12->created_by = '1';
     $sched12->modified_user_id = '1';
     $sched12->catch_up = '0';
     $sched12->save();
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:76,代码来源:Scheduler.php

示例9: elseif

// neither
if ($_REQUEST['job_function'] == '' && ($_REQUEST['job_url'] == '' || $_REQUEST['job_url'] == 'http://')) {
    $GLOBALS['log']->fatal('Scheduler save did not get a job_url or job_function');
} elseif ($_REQUEST['job_function'] != '' && ($_REQUEST['job_url'] != '' && $_REQUEST['job_url'] != 'http://')) {
    $GLOBALS['log']->fatal('Scheduler got both a job_url and job_function');
}
//function
if ($_REQUEST['job_function'] != '' && ($_REQUEST['job_url'] == '' || $_REQUEST['job_url'] == 'http://')) {
    $focus->job = $_REQUEST['job_function'];
} elseif ($_REQUEST['job_function'] == '' && ($_REQUEST['job_url'] != '' && $_REQUEST['job_url'] != 'http://')) {
    // url
    $focus->job = 'url::' . $_REQUEST['job_url'];
}
// url wins if both passed
// save should refresh ALL jobs
$focus->save();
$return_id = $focus->id;
$edit = '';
if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") {
    $return_module = $_REQUEST['return_module'];
} else {
    $return_module = "Schedulers";
}
if (isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") {
    $return_action = $_REQUEST['return_action'];
} else {
    $return_action = "DetailView";
}
if (isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") {
    $return_id = $_REQUEST['return_id'];
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:Save.php

示例10: Scheduler

    $sched6->status = 'Active';
    $sched6->created_by = '1';
    $sched6->modified_user_id = '1';
    $sched6->catch_up = '1';
    $sched6->save();
    $sched7 = new Scheduler();
    $sched7->name = 'Prune Database on 1st of Month';
    $sched7->job = 'function::pruneDatabase';
    $sched7->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
    $sched7->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
    $sched7->job_interval = '0::4::1::*::*';
    $sched7->status = 'Inactive';
    $sched7->created_by = '1';
    $sched7->modified_user_id = '1';
    $sched7->catch_up = '0';
    $sched7->save();
} else {
    $scheduler->rebuildDefaultSchedulers();
}
echo $mod_strings['LBL_PERFORM_DONE'];
// Enable Sugar Feeds and add all feeds by default
installLog("Enable SugarFeeds");
enableSugarFeeds();
// Enable the InsideView connector and add all modules
installLog("Enable InsideView Connector");
enableInsideViewConnector();
///////////////////////////////////////////////////////////////////////////////
////    START DEMO DATA
// populating the db with seed data
installLog("populating the db with seed data");
if ($_SESSION['demoData'] != 'no') {
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:31,代码来源:performSetup.php

示例11: getOrCreateScheduler

 /**
  * batch getOrCreateScheduler returns a scheduler by name, create it if doesnt exist
  * 
  * @param KalturaScheduler $scheduler
  * @return Scheduler
  */
 private function getOrCreateScheduler(KalturaScheduler $scheduler)
 {
     $c = new Criteria();
     $c->add(SchedulerPeer::CONFIGURED_ID, $scheduler->configuredId);
     $schedulerDb = SchedulerPeer::doSelectOne($c, myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2));
     if ($schedulerDb) {
         if (strlen($schedulerDb->getHost()) && $schedulerDb->getHost() != $scheduler->host) {
             throw new KalturaAPIException(KalturaErrors::SCHEDULER_HOST_CONFLICT, $scheduler->configuredId, $scheduler->host, $schedulerDb->getHost());
         }
         if ($schedulerDb->getName() != $scheduler->name || $schedulerDb->getHost() != $scheduler->host) {
             $schedulerDb->setName($scheduler->name);
             $schedulerDb->setHost($scheduler->host);
             $schedulerDb->save();
         }
         return $schedulerDb;
     }
     $schedulerDb = new Scheduler();
     $schedulerDb->setLastStatus(time());
     $schedulerDb->setName($scheduler->name);
     $schedulerDb->setHost($scheduler->host);
     $schedulerDb->setConfiguredId($scheduler->configuredId);
     $schedulerDb->setDescription('');
     $schedulerDb->save();
     return $schedulerDb;
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:BatchControlService.php

示例12: rebuildDefaultSchedulers

 /**
  * Archives schedulers of the same functionality, then instantiates new
  * ones.
  */
 function rebuildDefaultSchedulers()
 {
     $mod_strings = return_module_language($GLOBALS['current_language'], 'Schedulers');
     // truncate scheduler-related tables
     $this->db->query('DELETE FROM schedulers');
     $sched1 = new Scheduler();
     $sched1->name = $mod_strings['LBL_OOTB_WORKFLOW'];
     $sched1->job = 'function::processAOW_Workflow';
     $sched1->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched1->date_time_end = null;
     $sched1->job_interval = '*::*::*::*::*';
     $sched1->status = 'Active';
     $sched1->created_by = '1';
     $sched1->modified_user_id = '1';
     $sched1->catch_up = '1';
     $sched1->save();
     $sched2 = new Scheduler();
     $sched2->name = $mod_strings['LBL_OOTB_REPORTS'];
     $sched2->job = 'function::aorRunScheduledReports';
     $sched2->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched2->date_time_end = null;
     $sched2->job_interval = '*::*::*::*::*';
     $sched2->status = 'Active';
     $sched2->created_by = '1';
     $sched2->modified_user_id = '1';
     $sched2->catch_up = '1';
     $sched2->save();
     $sched3 = new Scheduler();
     $sched3->name = $mod_strings['LBL_OOTB_TRACKER'];
     $sched3->job = 'function::trimTracker';
     $sched3->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched3->date_time_end = null;
     $sched3->job_interval = '0::2::1::*::*';
     $sched3->status = 'Active';
     $sched3->created_by = '1';
     $sched3->modified_user_id = '1';
     $sched3->catch_up = '1';
     $sched3->save();
     $sched4 = new Scheduler();
     $sched4->name = $mod_strings['LBL_OOTB_IE'];
     $sched4->job = 'function::pollMonitoredInboxesAOP';
     $sched4->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched4->date_time_end = null;
     $sched4->job_interval = '*::*::*::*::*';
     $sched4->status = 'Active';
     $sched4->created_by = '1';
     $sched4->modified_user_id = '1';
     $sched4->catch_up = '0';
     $sched4->save();
     $sched5 = new Scheduler();
     $sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
     $sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
     $sched5->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched5->date_time_end = null;
     $sched5->job_interval = '0::2-6::*::*::*';
     $sched5->status = 'Active';
     $sched5->created_by = '1';
     $sched5->modified_user_id = '1';
     $sched5->catch_up = '1';
     $sched5->save();
     $sched6 = new Scheduler();
     $sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
     $sched6->job = 'function::runMassEmailCampaign';
     $sched6->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched6->date_time_end = null;
     $sched6->job_interval = '0::2-6::*::*::*';
     $sched6->status = 'Active';
     $sched6->created_by = '1';
     $sched6->modified_user_id = '1';
     $sched6->catch_up = '1';
     $sched6->save();
     $sched7 = new Scheduler();
     $sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
     $sched7->job = 'function::pruneDatabase';
     $sched7->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched7->date_time_end = null;
     $sched7->job_interval = '0::4::1::*::*';
     $sched7->status = 'Inactive';
     $sched7->created_by = '1';
     $sched7->modified_user_id = '1';
     $sched7->catch_up = '0';
     $sched7->save();
     $sched8 = new Scheduler();
     $sched8->name = $mod_strings['LBL_OOTB_LUCENE_INDEX'];
     $sched8->job = 'function::aodIndexUnindexed';
     $sched8->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched8->date_time_end = null;
     $sched8->job_interval = "0::0::*::*::*";
     $sched8->status = 'Active';
     $sched8->created_by = '1';
     $sched8->modified_user_id = '1';
     $sched8->catch_up = '0';
     $sched8->save();
     $sched9 = new Scheduler();
     $sched9->name = $mod_strings['LBL_OOTB_OPTIMISE_INDEX'];
     $sched9->job = 'function::aodOptimiseIndex';
//.........这里部分代码省略.........
开发者ID:pikkoui,项目名称:suitecrm,代码行数:101,代码来源:Scheduler.php

示例13: rebuildDefaultSchedulers

 /**
  * Archives schedulers of the same functionality, then instantiates new
  * ones.
  */
 function rebuildDefaultSchedulers()
 {
     $mod_strings = return_module_language($GLOBALS['current_language'], 'Schedulers');
     // truncate scheduler-related tables
     $this->db->query('DELETE FROM schedulers');
     $sched3 = new Scheduler();
     $sched3->name = $mod_strings['LBL_OOTB_TRACKER'];
     $sched3->job = 'function::trimTracker';
     $sched3->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched3->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched3->job_interval = '0::2::1::*::*';
     $sched3->status = 'Active';
     $sched3->created_by = '1';
     $sched3->modified_user_id = '1';
     $sched3->catch_up = '1';
     $sched3->save();
     $sched4 = new Scheduler();
     $sched4->name = $mod_strings['LBL_OOTB_IE'];
     $sched4->job = 'function::pollMonitoredInboxes';
     $sched4->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched4->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched4->job_interval = '*::*::*::*::*';
     $sched4->status = 'Active';
     $sched4->created_by = '1';
     $sched4->modified_user_id = '1';
     $sched4->catch_up = '0';
     $sched4->save();
     $sched5 = new Scheduler();
     $sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
     $sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
     $sched5->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched5->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched5->job_interval = '0::2-6::*::*::*';
     $sched5->status = 'Active';
     $sched5->created_by = '1';
     $sched5->modified_user_id = '1';
     $sched5->catch_up = '1';
     $sched5->save();
     $sched6 = new Scheduler();
     $sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
     $sched6->job = 'function::runMassEmailCampaign';
     $sched6->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched6->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched6->job_interval = '0::2-6::*::*::*';
     $sched6->status = 'Active';
     $sched6->created_by = '1';
     $sched6->modified_user_id = '1';
     $sched6->catch_up = '1';
     $sched6->save();
     $sched7 = new Scheduler();
     $sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
     $sched7->job = 'function::pruneDatabase';
     $sched7->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched7->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched7->job_interval = '0::4::1::*::*';
     $sched7->status = 'Inactive';
     $sched7->created_by = '1';
     $sched7->modified_user_id = '1';
     $sched7->catch_up = '0';
     $sched7->save();
     $sched12 = new Scheduler();
     $sched12->name = $mod_strings['LBL_OOTB_SEND_EMAIL_REMINDERS'];
     $sched12->job = 'function::sendEmailReminders';
     $sched12->date_time_start = create_date(2008, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched12->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched12->job_interval = '*::*::*::*::*';
     $sched12->status = 'Active';
     $sched12->created_by = '1';
     $sched12->modified_user_id = '1';
     $sched12->catch_up = '0';
     $sched12->save();
     $sched13 = new Scheduler();
     $sched13->name = $mod_strings['LBL_OOTB_CLEANUP_QUEUE'];
     $sched13->job = 'function::cleanJobQueue';
     $sched13->date_time_start = create_date(2012, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched13->date_time_end = create_date(2030, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched13->job_interval = '0::5::*::*::*';
     $sched13->status = 'Active';
     $sched13->created_by = '1';
     $sched13->modified_user_id = '1';
     $sched13->catch_up = '0';
     $sched13->save();
     $sched14 = new Scheduler();
     $sched14->name = $mod_strings['LBL_OOTB_REMOVE_DOCUMENTS_FROM_FS'];
     $sched14->job = 'function::removeDocumentsFromFS';
     $sched14->date_time_start = create_date(2012, 1, 1) . ' ' . create_time(0, 0, 1);
     $sched14->date_time_end = create_date(2030, 12, 31) . ' ' . create_time(23, 59, 59);
     $sched14->job_interval = '0::3::1::*::*';
     $sched14->status = 'Active';
     $sched14->created_by = '1';
     $sched14->modified_user_id = '1';
     $sched14->catch_up = '0';
     $sched14->save();
     $sched15 = new Scheduler();
     $sched15->name = $mod_strings['LBL_OOTB_SUGARFEEDS'];
     $sched15->job = 'function::trimSugarFeeds';
//.........这里部分代码省略.........
开发者ID:omusico,项目名称:windcrm,代码行数:101,代码来源:Scheduler.php

示例14: rebuildDefaultSchedulers

 /**
  * Archives schedulers of the same functionality, then instantiates new
  * ones.
  */
 function rebuildDefaultSchedulers()
 {
     global $mod_strings;
     // truncate scheduler-related tables
     $this->db->query('DELETE FROM schedulers');
     $this->db->query('DELETE FROM schedulers_times');
     $sched4 = new Scheduler();
     $sched4->name = $mod_strings['LBL_OOTB_IE'];
     $sched4->job = 'function::pollMonitoredInboxes';
     $sched4->date_time_start = '2005-01-01 00:00:01';
     $sched4->date_time_end = '2020-12-31 23:59:59';
     $sched4->job_interval = '*::*::*::*::*';
     $sched4->status = 'Active';
     $sched4->created_by = '1';
     $sched4->modified_user_id = '1';
     $sched4->catch_up = '0';
     $sched4->save();
     $sched5 = new Scheduler();
     $sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
     $sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
     $sched5->date_time_start = '2005-01-01 00:00:01';
     $sched5->date_time_end = '2020-12-31 23:59:59';
     $sched5->job_interval = '0::2-6::*::*::*';
     $sched5->status = 'Active';
     $sched5->created_by = '1';
     $sched5->modified_user_id = '1';
     $sched5->catch_up = '1';
     $sched5->save();
     $sched6 = new Scheduler();
     $sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
     $sched6->job = 'function::runMassEmailCampaign';
     $sched6->date_time_start = '2005-01-01 00:00:01';
     $sched6->date_time_end = '2020-12-31 23:59:59';
     $sched6->job_interval = '0::2-6::*::*::*';
     $sched6->status = 'Active';
     $sched6->created_by = '1';
     $sched6->modified_user_id = '1';
     $sched6->catch_up = '1';
     $sched6->save();
     $sched7 = new Scheduler();
     $sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
     $sched7->job = 'function::pruneDatabase';
     $sched7->date_time_start = '2005-01-01 00:00:01';
     $sched7->date_time_end = '2020-12-31 23:59:59';
     $sched7->job_interval = '0::4::1::*::*';
     $sched7->status = 'Inactive';
     $sched7->created_by = '1';
     $sched7->modified_user_id = '1';
     $sched7->catch_up = '0';
     $sched7->save();
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:55,代码来源:Scheduler.php


注:本文中的Scheduler::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。