一、查看定时任务

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. 用meta标签让双核浏览器用我们指定的内核渲染

    <html> <head> <meta name="renderer" content="webkit|ie-comp|ie-stand&q ...

  2. 机器学习入门-混淆矩阵-准确度-召回率-F1score 1.itertools.product 2. confusion_matrix(test_y, pred_y)

    1. itertools.product  进行数据的多种组合 intertools.product(range(0, 1), range(0, 1))  组合的情况[0, 0], [0, 1], [ ...

  3. C#--数组、字符与字符串--StringBuilder类、字符与字符串、字符及转义字符

    C#--数组 字符与字符串--StringBuilder类 字符与字符串 字符及转义字符

  4. Inspector视图中的get/set使用

    using UnityEngine; using System.Collections; public class Test : MonoBehaviour { public int width { ...

  5. Spring Boot Unregistering JMX-exposed beans on shutdown

    创建springboot项目运行的时候报这个错误Unregistering JMX-exposed beans on shutdown,搜索发现第一条是: Spring boot 嵌入的tomcat不 ...

  6. homewor

    <jsp;include>动作和指令的区别: 一:执行时间上: <%@ include file=”relativeURI”%>                   是在翻译阶 ...

  7. Tomcat数据库连接池配置

    Tomcat数据库连接池配置 1.            Server.xml的配置 (1)找到tomcat所在目录下的conf\server.xml文件 (2)在文件最后一个</host> ...

  8. Nsis Sqlite Plugin

    1.https://stackoverflow.com/questions/15346338/nsis-and-sqlite-integration 2.http://nsis.sourceforge ...

  9. 获取Activity中得到焦点的EditText

    Android Activity中获取当前焦点的控件,自动化输入EditText 获取焦点的view对象 View view=getWindow().getDecorView().findFocus( ...

  10. 一些常用的c++系统函数

    数学<cmath><math.h>: 1 三角函数 double sin (double); double cos (double); double tan (double); ...