每天在特定时间执行一个 shell 脚本 [英] Execute a shell script everyday at specific time

查看:34
本文介绍了每天在特定时间执行一个 shell 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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).

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

How can I do that?

解决方案

You want to edit your crontab file using

crontab -e

Then you want to add

55 23 * * * COMMAND TO BE EXECUTED

for more info look at this

这篇关于每天在特定时间执行一个 shell 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆