• 定时任务


    安装crontab:
    yum install crontabs
    
    说明:
    /sbin/service crond start //启动服务
    /sbin/service crond stop //关闭服务
    /sbin/service crond restart //重启服务
    /sbin/service crond reload //重新载入配置
    
     
    
    查看crontab服务状态:service crond status
    
    手动启动crontab服务:service crond start
    
    查看crontab服务是否已设置为开机启动,执行命令:ntsysv
    
    加入开机自动启动:
    chkconfig –level 35 crond on
    
    crontab命令:
    
    功能说明:设置计时器。
    
    语  法:crontab [-u <用户名称>][配置文件] 或 crontab [-u <用户名称>][-elr]
    
    第二个例子,也就是本教程测试的例子
    
    * * * * * /usr/bin/php -f /root/test.php >> test.log
    
    
    每一分钟执行/root/test.php文件,将结果输出到test.log中。


    * * * * * /usr/bin/curl 链接  >> 保存到路径
    * * * * * /usr/local/php/bin/php   文件目录 >> 保存路径

  • 相关阅读:
    一道题DP
    BZOJ 3155: Preprefix sum
    BZOJ:3209: 花神的数论题
    TJU 4087. box
    BZOJ1192: [HNOI2006]鬼谷子的钱袋
    概率DP
    Codeforces Round #253 (Div. 2) D题
    二维树状数组
    Codeforces Round #250 (Div. 2)
    莫比乌斯函数
  • 原文地址:https://www.cnblogs.com/lixiaomingtongxue/p/8608688.html
Copyright © 2020-2023  润新知