开心生活站

位置:首页 > IT科技 > 

linux定时执行shell脚本

IT科技1.18W

1、编写一个脚本,修改脚本的权限,确保脚本有执行的权限。

linux定时执行shell脚本

2、下载crontab,开启crontab服务,用service crond start //启动服务 。

linux定时执行shell脚本 第2张

3、设置执行的脚本,在命令行输入: crontab -e 然后添加相应的任务,wq存盘退出即可。

linux定时执行shell脚本 第3张