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


PHP cron::set方法代码示例

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


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

示例1: callback_init

function callback_init()
{
    global $m;
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "wmzz_ban` (\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\n`uid`  int(255) NOT NULL ,\n`pid`  int(255) NOT NULL ,\n`tieba`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,\n`user`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,\n`date`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' ,\n`nextdo`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' ,\nPRIMARY KEY (`id`)\n)\nENGINE=MyISAM\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\nAUTO_INCREMENT=12\nCHECKSUM=0\nROW_FORMAT=DYNAMIC\nDELAY_KEY_WRITE=0;");
    option::set('plugin_wmzz_ban', 'a:2:{s:5:"limit";s:2:"10";s:3:"msg";s:63:"由于你违反了吧规,现在已被本吧管理循环封禁";}');
    cron::set('wmzz_ban', 'plugins/wmzz_ban/wmzz_ban_cron.php', 0, 0, 0);
}
开发者ID:chajianku,项目名称:wmzz_ban,代码行数:7,代码来源:wmzz_ban_callback.php

示例2: callback_init

function callback_init()
{
    global $m;
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "pch18_relist` (\n  `id` int(10) NOT NULL,\n  `lastdate` varchar(20) CHARACTER SET utf8 NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `id` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;");
    cron::set('pch18_relist', 'plugins/pch18_relist/run.php', 0, 0, 0);
    $m->query("INSERT INTO `" . DB_NAME . "`.`" . DB_PREFIX . "options` (`name`,`value`) VALUES  ('relist','1')");
}
开发者ID:chajianku,项目名称:pch18_relist,代码行数:7,代码来源:pch18_relist_callback.php

示例3: callback_install

function callback_install()
{
    option::pset("reg_supervise", array('geetest_id' => '11dc9995dc0bad48b0f09be598d36cc5', 'geetest_key' => '2d0448808629d1921f836d19d131e690'));
    global $m;
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "reg` (\n  `ip` varchar(100) NOT NULL,\n UNIQUE KEY `ip` (`ip`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
    cron::set('reg_supervise', 'plugins/reg_supervise/reg_supervise_cron.php', 0, '清理注册ip记录等<br/>忽略或卸载此任务可能会导致无法正常注册', 0);
}
开发者ID:chajianku,项目名称:reg_supervise,代码行数:7,代码来源:reg_supervise_callback.php

示例4: callback_init

function callback_init()
{
    option::add('wmzz_mailer_title');
    option::add('wmzz_mailer_text');
    option::set('wmzz_mailer_limit', '5');
    option::set('wmzz_mailer_last', '0');
    cron::set('wmzz_mailer', 'plugins/wmzz_mailer/wmzz_mailer_cron.php', 0, 0, 0);
}
开发者ID:noinlijin,项目名称:tiebaSign,代码行数:8,代码来源:wmzz_mailer_callback.php

示例5: callback_init

function callback_init()
{
    global $m;
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "wmzz_zan` (\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\n`uid`  int(255) NOT NULL ,\n`num`  int(255) NULL DEFAULT 0 ,\n`lastdo`  date NOT NULL DEFAULT '0000-00-00' ,\nPRIMARY KEY (`id`, `uid`),\nUNIQUE INDEX `uid` (`uid`) USING BTREE \n)\nENGINE=MyISAM\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\nAUTO_INCREMENT=3\nCHECKSUM=0\nROW_FORMAT=DYNAMIC\nDELAY_KEY_WRITE=0\n;");
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "wmzz_zan_data` (\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\n`uid`  int(255) NOT NULL DEFAULT 0 ,\n`pid`  int(255) NOT NULL DEFAULT 0 ,\n`tieba`  varchar(10000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,\n`remain`  int(255) NOT NULL DEFAULT 0 ,\nPRIMARY KEY (`id`)\n)\nENGINE=MyISAM\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\nAUTO_INCREMENT=7\nCHECKSUM=0\nROW_FORMAT=DYNAMIC\nDELAY_KEY_WRITE=0\n;");
    option::set('plugin_Cloud_Click', 'a:6:{s:3:"num";s:2:"10";s:2:"sp";s:1:"3";s:3:"rem";s:2:"10";s:4:"lmax";s:1:"0";s:4:"cmax";s:1:"0";s:3:"max";s:1:"0";}');
    cron::set('wmzz_zan', 'plugins/Cloud_Click/run.php', 0, 0, 0);
}
开发者ID:chajianku,项目名称:Cloud_Click,代码行数:8,代码来源:Cloud_Click_callback.php

示例6: callback_init

function callback_init()
{
    //global $m;
    //$nowtime=time();
    //$last=$nowtime-($nowtime-1398787200)%86400+10800-86400;
    //$m->query("CREATE TABLE IF NOT EXISTS `".DB_NAME."`.`".DB_PREFIX."tdou_log` ( `uid` int(10) unsigned NOT NULL, `date` varchar(100) NOT NULL DEFAULT '0', `num` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`uid`), UNIQUE KEY `uid` (`uid`,`date`), KEY `uid_2` (`uid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
    cron::set('signtz_mail', 'plugins/haotian_signtz/send.php', '0', '0', '0');
}
开发者ID:chajianku,项目名称:haotian_signtz,代码行数:8,代码来源:haotian_signtz_callback.php

示例7: callback_init

function callback_init()
{
    global $m;
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "weixinArticle` (\r\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\r\n`uid`  int(255) NOT NULL ,\r\n`cont`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,\r\n`num`  int(255) NULL DEFAULT NULL ,\r\n`lastdo`  date NOT NULL DEFAULT '0000-00-00' ,\r\nPRIMARY KEY (`id`, `uid`),\r\nUNIQUE INDEX `uid` (`uid`) USING BTREE \r\n)\r\nENGINE=MyISAM\r\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\r\nCHECKSUM=0\r\nROW_FORMAT=DYNAMIC\r\nDELAY_KEY_WRITE=0\r\n;");
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "weixinArticle_data` (\r\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\r\n`uid`  int(255) NOT NULL DEFAULT 0 ,\r\n`pid`  int(255) NOT NULL DEFAULT 0 ,\r\n`url`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,\r\n`status`  int(10) NOT NULL DEFAULT 0 ,\r\n`msg`  varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,\r\n`remain`  int(255) NOT NULL DEFAULT 0 ,\r\nPRIMARY KEY (`id`)\r\n)\r\nENGINE=MyISAM\r\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\r\nCHECKSUM=0\r\nROW_FORMAT=DYNAMIC\r\nDELAY_KEY_WRITE=0\r\n;");
    cron::set('weixinArticle', 'plugins/weixinArticle/weixinArticle_cron.php', 0, 0, 0);
    option::add('plugin_weixinArticle', 'a:7:{s:5:"sleep";s:1:"0";s:4:"lmax";s:1:"0";s:4:"cmax";s:1:"0";s:3:"max";s:1:"0";s:3:"rem";s:1:"5";s:7:"defcont";s:72:"欢迎使用 StusGame 贴吧云灌水
这是一个默认的灌水内容";s:6:"device";s:1:"4";}');
}
开发者ID:noinlijin,项目名称:tiebaSign,代码行数:9,代码来源:weixinArticle_callback.php

示例8: callback_init

function callback_init()
{
    $day = option::get('dl_backup_day');
    $email = option::get('dl_backup_email');
    if (empty($day)) {
        option::set('dl_backup_day', 1);
    }
    if (empty($email)) {
        option::set('dl_backup_email', EMAIL);
    }
    cron::set('dl_backup', 'plugins/dl_backup/backup.php', 0, 0, 0);
}
开发者ID:MoeGakuen,项目名称:dl_backup,代码行数:12,代码来源:dl_backup_callback.php

示例9: cron_wmzz_mailer

function cron_wmzz_mailer()
{
    global $m;
    $check = option::get('wmzz_mailer_check');
    if ($check == '1') {
        $text = option::get('wmzz_mailer_text');
        $title = option::get('wmzz_mailer_title');
        $limit = option::get('wmzz_mailer_limit');
        $last = option::get('wmzz_mailer_last');
        $done = 0;
        $z = $m->query("SELECT * FROM  `" . DB_NAME . "`.`" . DB_PREFIX . "users` LIMIT {$last},{$limit}");
        while ($v = $m->fetch_array($z)) {
            $done++;
            misc::mail($v['email'], $title, $text);
        }
        if ($done - $limit <= -1) {
            option::set('wmzz_mailer_check', '0');
            option::set('wmzz_mailer_last', '0');
            cron::set('wmzz_mailer', 'plugins/wmzz_mailer/wmzz_mailer_cron.php', 1);
            return '所有邮件群发任务于 ' . date('Y-m-d H:m:s') . ' 完成';
        }
        option::set('wmzz_mailer_last', $done + $last);
    }
}
开发者ID:noinlijin,项目名称:tiebaSign,代码行数:24,代码来源:wmzz_mailer_cron.php

示例10: callback_init

function callback_init()
{
    cron::set('mok_zdwk', 'plugins/mok_zdwk/mok_zdwk_cron.php', 0, 0, 0);
}
开发者ID:chajianku,项目名称:mok_zdwk,代码行数:4,代码来源:mok_zdwk_callback.php

示例11: Redirect

     }
     Redirect('index.php?mod=admin:users&ok');
     break;
 case 'admin:cron':
     doAction('cron_setting_1');
     if (!empty($_GET['act'])) {
         cron::aset($_GET['act'], array('no' => 0));
     } elseif (!empty($_GET['dis'])) {
         cron::aset($_GET['dis'], array('no' => 1));
     } elseif (isset($_GET['uninst'])) {
         cron::del($_GET['uninst']);
     } elseif (isset($_GET['add'])) {
         if (stripos($_POST['file'], 'do.php') !== false) {
             msg('<h4>请不要将do.php加入到云签的计划任务中来</h4>若需签到,请用云监控监控<br/>' . SYSTEM_URL . 'do.php<br/>即可实现计划任务(cron)的效果<br/><br/>推荐云监控:<a href="http://www.aliyun.com/product/jiankong/" target="_blank">阿里云监控</a> 或 <a href="http://jk.cloud.360.cn/" target="_blank">360网站服务监控</a> 或 <a href="http://ce.baidu.com/" target="_blank">百度云观测</a><br/>如果你的服务器在国外且国内访问较慢,则推荐使用:<a href="http://www.mywebcron.com/" target="_blank">Free Web Cron Service </a>', SYSTEM_URL . 'index.php?mod=admin:cron');
         } else {
             cron::set($_POST['name'], $_POST['file'], $_POST['no'], $_POST['status'], $_POST['freq'], $_POST['lastdo'], $_POST['log']);
         }
     } elseif (isset($_GET['run'])) {
         $return = cron::run($_GET['file'], $_GET['run']);
         cron::aset($_GET['run'], array('lastdo' => time(), 'log' => $return));
     } elseif (isset($_GET['xorder'])) {
         foreach ($_POST['order'] as $key => $value) {
             cron::aset($key, array('orde' => $value));
         }
     }
     doAction('cron_setting_2');
     Redirect('index.php?mod=admin:cron&ok');
     break;
 case 'admin:update:back':
     if (isset($_GET['del'])) {
         if (file_exists(SYSTEM_ROOT . '/setup/update_backup/' . $_GET['del'])) {
开发者ID:a395183830,项目名称:Tieba-Cloud-Sign,代码行数:31,代码来源:setting.php

示例12: msg

}
if (ROLE != 'admin') {
    msg('权限不足');
}
if (isset($_GET['add'])) {
    global $m;
    option::set('wmzz_mailer_title', addslashes($_POST['title']));
    option::set('wmzz_mailer_text', addslashes($_POST['text']));
    option::set('wmzz_mailer_limit', $_POST['limit']);
    if ($_POST['check'] == '1') {
        option::set('wmzz_mailer_check', '1');
        cron::set('wmzz_mailer', 'plugins/wmzz_mailer/wmzz_mailer_cron.php', 0);
    } else {
        option::set('wmzz_mailer_check', '0');
        option::set('wmzz_mailer_last', '0');
        cron::set('wmzz_mailer', 'plugins/wmzz_mailer/wmzz_mailer_cron.php', 1);
    }
    ReDirect(SYSTEM_URL . 'index.php?plugin=wmzz_mailer&ok');
} else {
    loadhead();
    if (isset($_GET['ok'])) {
        echo '<div class="alert alert-success">设置已保存。当群发任务完成后,"开始群发" 复选框将自动取消</div>';
    }
    ?>
<h2>群发邮件给所有用户</h2><br/>
<?php 
    if (option::get('wmzz_mailer_check') != '0') {
        echo '群发任务现在已开始,已发送 ' . option::get('wmzz_mailer_last') . ' 封邮件<br/><br/>';
    }
    ?>
<form action="index.php?plugin=wmzz_mailer&add" method="post">
开发者ID:chajianku,项目名称:wmzz_mailer,代码行数:31,代码来源:wmzz_mailer_show.php

示例13: callback_init

function callback_init()
{
    cron::set('lwl12_resign', 'plugins/lwl12_resign/lwl12_resign_cron.php', 0, 0, 0);
    header("Location: /index.php?mod=admin:setplug&plug=lwl12_resign&new");
    exit;
}
开发者ID:chajianku,项目名称:lwl12_resign,代码行数:6,代码来源:lwl12_resign_callback.php

示例14: callback_init

function callback_init()
{
    option::set('dl_yjtz_time', 0);
    cron::set('dl_yjtz', 'plugins/dl_yjtz/run.php', 0, 0, 0);
}
开发者ID:chajianku,项目名称:dl_yjtz,代码行数:5,代码来源:dl_yjtz_callback.php

示例15: Redirect

     }
     Redirect('index.php?mod=admin:users&ok');
     break;
 case 'admin:cron':
     doAction('cron_setting_1');
     if (!empty($_GET['act'])) {
         cron::aset($_GET['act'], array('no' => 0));
     } elseif (!empty($_GET['dis'])) {
         cron::aset($_GET['dis'], array('no' => 1));
     } elseif (isset($_GET['uninst'])) {
         cron::del($_GET['uninst']);
     } elseif (isset($_GET['add'])) {
         if (stripos($_POST['file'], 'do.php') !== false) {
             msg('<h4>请不要将do.php加入到云签的计划任务中来</h4>若需签到,请用云监控监控<br/>' . SYSTEM_URL . 'do.php<br/>即可实现计划任务(cron)的效果<br/><br/>推荐云监控:<a href="http://www.aliyun.com/product/jiankong/" target="_blank">阿里云监控</a> 或 <a href="http://jk.cloud.360.cn/" target="_blank">360网站服务监控</a> 或 <a href="http://ce.baidu.com/" target="_blank">百度云观测</a><br/>如果你的服务器在国外且国内访问较慢,则推荐使用:<a href="http://www.mywebcron.com/" target="_blank">Free Web Cron Service </a>', SYSTEM_URL . 'index.php?mod=admin:cron');
         } else {
             cron::set($_POST['name'], $_POST['file'], $_POST['no'], $_POST['desc'], $_POST['freq'], $_POST['lastdo'], $_POST['log']);
         }
     } elseif (isset($_GET['run'])) {
         $return = cron::run($_GET['file'], $_GET['run']);
         cron::aset($_GET['run'], array('lastdo' => time(), 'log' => $return));
     } elseif (isset($_GET['xorder'])) {
         foreach ($_POST['order'] as $key => $value) {
             cron::aset($key, array('orde' => $value));
         }
     }
     doAction('cron_setting_2');
     Redirect('index.php?mod=admin:cron&ok');
     break;
 case 'admin:create_lock':
     if (!file_put_contents(SYSTEM_ROOT . '/setup/install.lock', '1')) {
         $msg = '未能放置 install.lock,请手动完成。<br/><br/>';
开发者ID:quericy,项目名称:Tieba-Cloud-Sign,代码行数:31,代码来源:setting.php


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