每天在特定时间执行Shell脚本

编程入门 行业动态 更新时间:2024-10-24 22:22:56
本文介绍了每天在特定时间执行Shell脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个简单的shell脚本,它仅检查目录的内容,如果白天没有添加任何内容,则将其复制到备份文件夹中. 我想在每天结束时执行此脚本(假设在23:55).

I have a simple shell script that just checks the contents of a directory and if anything was added during the day makes a copy of it to a backup folder. I'd like to execute this script at the end of each day (let's assume at 23:55).

此脚本所在的系统(Debian)始终处于(服务器类型)

The system(Debian) which this scripts reside on it, is always on (kind of server)

我该怎么做?

推荐答案

您要使用

crontab -e

然后您要添加

55 23 * * * COMMAND TO BE EXECUTED

有关更多信息,请参见此

for more info look at this

更多推荐

每天在特定时间执行Shell脚本

本文发布于:2023-11-25 18:40:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630895.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   时间   在特定   Shell

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!