How to use "cron" to create scheduled task

Minimum time cycle: 1 minute

Use crontab -e edit scheduled task

25     10      *   *    * (/bin/bash /your/scripts/dir/test.sh)

If user Environment Variable need to be used, you need add . /etc/profile and . ~/.bash_profile in your scripts:

test.sh

#!/bin/bash
. /etc/profile
. ~/.bash_profile

Import user's Environment path into Linux cron task的更多相关文章

  1. How to set JAVA environment variables in Linux or CentOS

    How to set JAVA environment variables JAVA_HOME and PATH in Linux After installing new java (jdk or ...

  2. How to locate a path? - Unix & Linux Stack Exchange

    How to locate a path? - Unix & Linux Stack Exchange http://unix.stackexchange.com/questions/2955 ...

  3. Unable to write inside TEMP environment path

    安装PostgreSQL 9:Unable to write inside TEMP environment path 注册表:regedit HKEY_CLASSES_ROOT\.vbs,设置默认为 ...

  4. Linux - cron - cron 表达式

    概述 之前 cron 的补充 这次介绍下 表达式 背景 之前有说过 cron 这次说下 表达式 1. 准备 环境 os centos7 2. 模板文件 文件 位置 /etc/crontab 作用 系统 ...

  5. Linux - cron - 基础

    概述 cron 相关的理解与使用 背景 最近实在没啥写的了 我写东西, 一般是是这些 看了书过后, 做一些系统的整理 比如之前的 docker 和 git 系列 遇到了实际问题, 解决过程也不是那么顺 ...

  6. linux cron计划任务、chkconfig 命令、systemd命令、unit 相关、target 相关

    1.设置说明位置 : cat /etc/crontab # Example of job definition:# .---------------- minute (0 - 59)# | .---- ...

  7. python import package at different path

    1.导入上一级目录的package import sys sys.path.append('..') import <package> # import package at ../ 2. ...

  8. add environment path to powershell

    https://4sysops.com/archives/use-powershell-to-execute-an-exe/ https://stackoverflow.com/questions/7 ...

  9. Linux Cron 定时任务

    作者:丁仪 来源:https://chengxuzhixin.com/blog/post/LinuxCron-ding-shi-ren-wu.html 定时任务是经常被用到的,比如系统备份.数据导出等 ...

随机推荐

  1. common.css 值得学习的css样式布局

    正常的项目当中,应当有一个common.css,就是把一些常用的样式,写入其中. 然后再结合一些特性的css,构造漂亮的页面. 下面欣赏一些海盗商城的common.css. /***样式初始化***/ ...

  2. c# post文字图片至服务器

    最近由于项目需要实现c#提交文字及数据至服务器,因此研究了一下c# php数据传送: 下面用一个示例来演示,c# post文字+图片 ,php端接收: post提交数据核心代码(post数据提交) ? ...

  3. 【转】关于usr/bin/ld: cannot find -lxxx问题总结

    原文网址:http://eminzhang.blog.51cto.com/5292425/1285705 /usr/bin/ld: cannot find -lxxx问题总结   linux下编译应用 ...

  4. [原创][下载]Senparc.Weixin.MP-微信公众平台SDK(C#) - 已支持微信6.x API

    因为正在计划做一个微信机器人,需要用ASP.NET,找了一下只有PHP的SDK,没有C#的,于是动手写了一个,已经全面支持微信6.x所有接口,包括多客服.卡券.微信支付等. 微信公众平台地址:http ...

  5. C# word开发

    c# 操作Word总结 在医疗管理系统中为保存患者的体检和治疗记录,方便以后的医生或其他人查看.当把数据保存到数据库中,需要新建很多的字段,而且操作很繁琐,于是想到网页的信息创建到一个word文本中, ...

  6. Nginx反向代理+DNS轮询+IIS7.5 千万PV 百万IP 双线 网站架构案例

    原文地址:http://www.jb51.net/article/31844.htm Nginx  ("engine x") 是一个高性能的 HTTP 和反向代理服务器,也是一个 ...

  7. D3D12 图形编程

    D3D 11到D3D 12的重大改进 Direct3D 12 的编程模型和 Direct3D 11大相径庭.在Direct3D 12中,应用程序和硬件靠得近多了,这在以前是从未有过的. 这让D3D12 ...

  8. LittleTool之批量修改材质

    using UnityEngine; using System.Collections; using UnityEditor; public class ChangeMaterial : Editor ...

  9. 【原】实战-Java如何使用Redis

    实战-Java如何使用Redis Redis的Client支持的语言非常丰富,如下: ActionScript Bash C C# C++ Clojure Common Lisp Crystal D ...

  10. JDK1.5新特性(三)……Varargs

    援引 Varargs - This facility eliminates the need for manually boxing up argument lists into an array w ...