当前位置:网站首页>利用win10计划任务程序定时自动运行jar包
利用win10计划任务程序定时自动运行jar包
2022-07-04 15:26:00 【@大熊_】
利用win10计划任务程序定时自动运行jar包
1. 开始前的准备
- .config配置文件目录(我的java程序中会读取一个.config文件夹里的配置文件,你们的根据自己编写的java程序而定,可忽略)
- 自己的jar包
- 新建一个空run.bat脚本
如图:
2. 编写run.bat脚本内容
记事本打开,输入执行jar的命令,并保存。
如:
java -jar D:\OneDrive\Desktop\update-tools\boot-01-helloworld-1.0.jar
3. 打开任务计划程序
在windows搜索框中搜索"任务计划程序",并打开。
新建一个文件夹,如图:
创建任务->常规 ,如图:
选到触发器->新建,如图:
选到操作->新建,如图:
图里的第5步很重要,如果你也像我一样,编写的java程序中会读取一个.config文件夹里的配置文件,这里**起始于:**的路径就需要填上jar和.config文件夹所在的路径,如果你编写java程序中不需要读取配置文件,这里可以不填也能运行jar包,但会不会影响程序的最终效果就不清楚了,建议都填上。最后点确认,就可以等待程序的运行了。
运行结果:
(图里的时间对不上,是因为是我之前截的图)
结束
如有错误之处,请斧正。
边栏推荐
- Hash table
- 从数数开始
- Sequence diagram data modeling and industrial chain analysis
- APOC custom functions and procedures
- Research Report on market supply and demand and strategy of tetramethylpyrazine industry in China
- 2022年国内云管平台厂商哪家好?为什么?
- 最大子数组与矩阵乘法
- Is it safe for Anxin securities to open an account online? Is the account opening fee charged
- Lv166 turned over
- Go development: how to use go singleton mode to ensure the security of high concurrency of streaming media?
猜你喜欢
嵌入式软件架构设计-函数调用
智慧物流园区供应链管理系统解决方案:数智化供应链赋能物流运输行业供应链新模式
The Ministry of human resources and Social Security announced the new construction occupation
多年锤炼,迈向Kata 3.0 !走进开箱即用的安全容器体验之旅| 龙蜥技术
Learn more about the basic situation of 2022pmp examination
容器环境minor gc异常频繁分析
Can you really use MySQL explain?
Visual Studio 2019 (LocalDB)MSSQLLocalDB SQL Server 2014 数据库版本为852无法打开,此服务器支持782
51 single chip microcomputer temperature alarm based on WiFi control
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
随机推荐
PyTorch深度学习快速入门教程
7 RSA密码体制
从数数开始
Solution of commercial supply chain coordination system in the mineral industry: build a digital intelligent supply chain platform to ensure the safe supply of mineral resources
The winning rate against people is 84%, and deepmind AI has reached the level of human experts in army chess for the first time
S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises
~88 running people practice
Overflow: the combination of auto and Felx
C# 更加优质的操作MongoDB数据库
Can you really use MySQL explain?
Use and principle of thread pool
【Go ~ 0到1 】 第六天 文件的读写与创建
Is it safe for Anxin securities to open an account online? Is the account opening fee charged
金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
[Chongqing Guangdong education] National Open University spring 2019 1248 public sector human resource management reference questions
The test experience "tortured" by the PMP test is worth your review
Cypher task design and task locking mechanism of isomorphic and heterogeneous graphs
Research Report on market supply and demand and strategy of China's four sided flat bag industry
Transformer中position encoding实践
China's plastic processing machinery market trend report, technological innovation and market forecast