废话不多说,直接上菜了
 
第一种:在/etc/crontab下设置,指定用户名的
1、vim命令进入/etc/crontab
2、在最后一行加上
59 23 * * * root /root/catalina.out.rm/rm_8080_8081_catalina.sh
如下说明:
crontab的两种配置方式
3、重启crontab,使配置生效
crontab的两种配置方式

 

 
第二种:直接用crontab -e,不需要指定用户
1、crontab -e进入
crontab的两种配置方式
2、:wq退出保存
3、查看上面那个脚本是否有执行权限
crontab的两种配置方式
4、还要看脚本里面的涉及的操作文件是否有权限
5、重启crontab,使配置生效
crontab的两种配置方式

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2021-06-29
  • 2021-12-10
  • 2021-09-02
猜你喜欢
  • 2021-12-18
  • 2021-11-23
  • 2021-11-20
  • 2022-01-19
  • 2022-01-18
  • 2022-12-23
相关资源
相似解决方案