当前位置:网站首页>Regular execution of shell scripts in crontab
Regular execution of shell scripts in crontab
2022-06-11 22:03:00 【Write more articles to make your hair grow】
First step : To write shell Script

shell The command in the second line of the script does one thing : Write the time when the script is executed /mysqlback/test.log file
#!/bin/bash
echo $(date "+%Y-%m-%d %H:%M:%S")>>/mysqlback/test.log
The second step : add to crontab Timing task
Execute the following command to open the scheduled task editor
crontab -e
Add timing task 
*/1 * * * * /bin/sh /mysqlback/test.sh
*/1 * * * * This is the execution frequency of the scheduled task , Means to execute... Every minute
/bin/sh /mysqlback/test.sh This is what you created in step 1 shell Script
边栏推荐
- The upcoming launch of the industry's first retail digital innovation white paper unlocks the secret of full link digital success
- 超標量處理器設計 姚永斌 第2章 Cache --2.4 小節摘錄
- Leetcode - 第2天
- Uncover the secret of the popular app. Why is it so black
- 为什么需要微服务
- 类和对象(2)
- 超标量处理器设计 姚永斌 第2章 Cache --2.3 小节摘录
- EndnoteX9简介及基本教程使用说明
- go encoding包
- How to use RPA robot to start the first step of digital transformation of freight forwarding industry?
猜你喜欢

In the future, cloud expansion technology is expected to be selected as a specialized, special and new enterprise in Shanghai

图书管理系统

Popular science | what are the types of NFT (Part 1)

Superscalar processor design yaoyongbin Chapter 2 cache -- Excerpt from subsection 2.4

【LeetCode】11. Container with the most water

Building a custom CNN model: identifying covid-19

类和对象(2)

Leetcode - 第2天

Classes and objects (4)

Maze problem in C language
随机推荐
How to use the transaction code sat to find the name of the background storage database table corresponding to a sapgui screen field
每日一题-删除有序数组的重复项
238.除自身以外数组的乘积
判断大小端存储两种办法
69. square root of X
科普 | NFT的类型有哪些(上)
R语言书籍学习03 《深入浅出R语言数据分析》-第八章 逻辑回归模型 第九章 聚类模型
华为设备配置HoVPN
Two methods to judge the storage of large and small end
如何使用事物码 SAT 查找某个 SAPGUI 屏幕字段对应的后台存储数据库表的名称试读版
超标量处理器设计 姚永斌 第2章 Cache --2.2 小节摘录
Static PVC with CEPH CSI
华为设备配置H-VPN
Addition without addition, subtraction, multiplication, Division
Implementation stack and queue
Rexroth overflow valve zdb6vp2-42/315v
Flink error: multiple tasks are started, and only one task is executed
Optimization of quick sort
效率起飞啊!还能这样开发的?
R language book learning 03 "in simple terms R language data analysis" - Chapter 7 linear regression model