在以前知道在Linux下查看Tomcat日志文件,

tail -f catalina.out

同样的命令"tail -f filename",我就可以看其它日志文件啦:

tail -f 2016_01_18_00_12request.log

就OK了。

 

Ubuntu下的crontab的启动和停止

停止

sudo /etc/init.d/cron stop

启动

sudo /etc/init.d/cron start

编辑corntab文件

sudo crontab -e

选择编辑器:

sudo select-editor

然后选择自己喜欢的编辑器,回车就可以了。

Corntab定时

# m h  dom mon dow   command
*/1 * * * * sudo curl http://localhost/soap_email/

上面是每一分钟访问一下网页,一个*代表一格

分别表示是

分钟(0-59)  小时(1-23)  日期(1-31)  月份(1-12) 星期(0-6,0代表星期天)  命令

 

定时任务文件,也有可能是放在/etc/crontab中,可以通过 sudo vim /etc/crontab 编辑定时任务

参考: Linux定时任务Crontab详解

相关文章:

  • 2021-11-08
  • 2021-11-23
  • 2021-10-28
  • 2021-11-11
  • 2021-12-26
  • 2021-11-16
猜你喜欢
  • 2021-11-19
  • 2021-11-23
  • 2022-12-23
  • 2021-09-10
  • 2021-12-21
  • 2022-01-03
  • 2021-06-13
相关资源
相似解决方案