当前位置:网站首页>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
边栏推荐
- Master of a famous school has been working hard for 5 years. AI has no paper. How can the tutor free range?
- 类和对象(4)
- Sword finger offer 29 Print matrix clockwise
- 使用VBScript读取网络的日志数据进行处理
- How to realize double speed playback and fast forward for restricted ckplayer players
- Huawei equipment configuration h-vpn
- win11怎么看电脑显卡信息
- 《物联网开发实战》18 场景联动:智能电灯如何感知光线?(上)(学习笔记)
- Zhanrui IOT chip 8910dm is certified by Deutsche Telekom
- 为什么需要微服务
猜你喜欢

Matlab: solution of folder locking problem

类和对象(2)

Implementation stack and queue

win10字体模糊怎么调节

How to use RPA robot to start the first step of digital transformation of freight forwarding industry?

Servlet get form data

Top - K problem

206. reverse linked list

Flink error: multiple tasks are started, and only one task is executed

R语言书籍学习03 《深入浅出R语言数据分析》-第七章 线性回归模型
随机推荐
如何使用事物码 SAT 查找某个 SAPGUI 屏幕字段对应的后台存储数据库表的名称试读版
Top - K problem
All features of polymorphism
类和对象(4)
Building a custom CNN model: identifying covid-19
R language book learning 03 "in simple terms R language data analysis" - Chapter 12 support vector machine Chapter 13 neural network
【学术相关】申请审核制下,到双一流大学读博的难度有多大?
如何使用事物码 SAT 查找某个 SAPGUI 屏幕字段对应的后台存储数据库表的名称
Superscalar processor design yaoyongbin Chapter 2 cache -- Excerpt from subsection 2.2
Internet of things development practice 18 scenario linkage: how does an intelligent light perceive light? (I) (learning notes)
Look for leap years and see how many leap years I have had since I was born (I have had five)
Nmap进行主机探测出现网段IP全部存活情况分析
Nmap performs analysis of all network segment IP survivals in host detection
Introduction to MySQL transactions
Conception du Processeur superscalaire Yao yongbin chapitre 2 cache - - sous - section 2.4 extrait
How to use the transaction code sat to find the name trial version of the background storage database table corresponding to a sapgui screen field
R language book learning 03 "in simple terms R language data analysis" - Chapter 7 linear regression model
Experiment 10 Bezier curve generation - experiment improvement - interactive generation of B-spline curve
联调这夜,我把同事打了...
C语言实现八种排序(2)