一、查看定时任务

crontab -l

二、添加定时任务

crontab -e

(一)执行外部链接

//每隔10分钟执行1次
*/ * * * * /usr/bin/curl "http://www.baidu.com/report/report.php

(二)执行内部文件

  1.php文件

//每天的6点、12点执行
, * * * /usr/bin/php /data/www/ixingmei/ixingmeib2c/api/first_or_last.php
0 6,12 * * *  /usr/bin/php url

  2.shell脚本

//整点、15、30、45分的时候执行
,,, * * * * /bin/bash /data/www/ixingmei/flush_showing.sh

三、重启服务crontab进程

/etc/init.d/crond restart

 四、查看日志

tail -f /var/log/cron

crontab定时任务操作的更多相关文章

  1. crontab(定时任务操作)

    定时任务顾名思义就是在某一时间点自动进行任务操作.在做Pgsql的备份利用crontab进行定时操作, 使用起来比较方便.故分享具体的定时编辑命令:crontab -e 首先从crontab的文件分析 ...

  2. Linux crontab 定时任务

    http://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/crontab.html 19. crontab 定时任务 通过crontab 命令,我们 ...

  3. crontab定时任务不执行的原因

    1.重启crontab若是遇见"You (cloudlogin) are not allowed to use this program (crontab)                 ...

  4. Storm框架:如何实现crontab定时任务

    Storm除了能对消息流进行处理,还能实现crontab定时任务. 只要在bolt中配置TOPOLOGY_TICK_TUPLE_FREQ_SECS项即可实现. @Override public Map ...

  5. crontab定时任务_net

    2017年2月25日, 星期六 crontab定时任务 19. crontab 定时任务 通过crontab 命令,我们可以在固定的间隔时间执行指定的系统指令或 shell script脚本.时间间隔 ...

  6. Linux命令之Crontab定时任务,利用Crontab定时执行spark任务

    Linux命令之Crontab定时任务,利用Crontab定时执行spark任务 一.Linux命令之Crontab定时任务 1.1 常见Crontab任务 1.1.1 安装crontab 1.1.2 ...

  7. linux ( crontab 定时任务命令)

    linux ( crontab 定时任务命令)    crontab 定时任务命令 linux 系统则是由 cron (crond) 这个系统服务来控制的.Linux 系统上面原本就有非常多的计划性工 ...

  8. linux定时任务 - crontab定时任务

    crontab 定时任务命令 linux 系统则是由 cron (crond) 这个系统服务来控制的.Linux 系统上面原本就有非常多的计划性工作,因此这个系统服务是默认启动的.另 外, 由于使用者 ...

  9. Linux下实现秒级的crontab定时任务

    crontab的格式如下 * * * * * command 分 时 日 月 周 命令 第1列表示分钟1-59 每分钟用*或者 */1表示 第2列表示小时1-23(0表示0点) 第3列表示日期1-31 ...

随机推荐

  1. pure框架

    内容: 1.介绍与入门 2.基础使用 参考资料: pure中文文档:https://www.purecss.cn/ pure实例:https://www.purecss.cn/layouts.html ...

  2. uva-657-搜索

    注意是四个方向(上下左右),不是八个方向,当成了八个方向做,一直wa AC时间:0ms #include<stdio.h> #include<iostream> #includ ...

  3. sssp-webservce_restful

    pom <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.or ...

  4. HTML5 Canvas ( 文字横纵对齐 ) textAlign, textBaseLine

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  5. leetcode551

    public class Solution { public bool CheckRecord(string s) { ; ; ; var preChar = '\0'; ; i < s.Len ...

  6. 1.urlencoder和urldecoder的使用

    今天传url的时候乱码了.先说情形,url中有searchText=中文的情形,后台new String(searchText.getBytes(ISO-8859-1),"gbk" ...

  7. 子元素scroll父元素容器不跟随滚动JS实现

    仅供参考: function parentNotRoll($id){ var flg;//标记滚动方向,true-向下,false-向上 var $test = document.getElement ...

  8. as3的全屏功能的实现主要是舞台stage的displayState属性

    StageDisplayState.NORMAL                                               正常 StageDisplayState.FULL_SCR ...

  9. gulp 用法 小结

    前端们,gulp该用起来了,简单的demo入门 gulp.grunt前端自动化工具,只有用过才知道多么重要. 作者:一文不提来源:博客园|2015-05-28 10:35 移动端 收藏 分享 gulp ...

  10. Haskell语言学习笔记(31)ListT

    Control.Monad.Trans.List 标准库中的 ListT 的实现由于有 bug,已经被废弃. list-t 模块 这里使用 list-t 模块中的 ListT. list-t 模块需要 ...