windows启动jar包,shell脚本启动jar包,后台运行生成日志
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
启动jar包
linux启动jar包并后台运行
# 根据jar包名称kill掉进程
kill -9 $( ps -ef | grep "demo-0.0.1-SNAPSHOT.jar" | grep -v "grep" | awk '{print $2}')
# 删除jar包和日志
rm -rf demo-0.0.1-SNAPSHOT.jar demo-0.0.1-SNAPSHOT.log
# 启动jar包并生成日志
nohup java -jar demo-0.0.1-SNAPSHOT.jar > demo-0.0.1-SNAPSHOT.log &
#设置jvm参数
nohup java -jar video.jar > video.log -Xmn10240m -Xmx40960m &
windows启动jar包并后台运行
# windos启动jar包
# 新建run.bat 输入:运行:
@echo off
%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
java -jar ai-0204.jar > ai0204.log 2>&1 &
exit
linux定时重启jar包
#!/bin/bash
i=0;
while [ 1 = 1 ]
do
echo '启动程序!!!video.jar'
kill -9 $( ps -ef | grep "video.jar" | grep -v "grep" | awk '{print $2}')
nohup java -jar video.jar > video.log -Xmn10240m -Xmx40960m &
i=$(( $i+1 ))
time1=$(date)
echo '第'$i'次执行启动!当前时间:'$time1
sleep 3600;
done
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献2条内容
所有评论(0)