当前位置:网站首页>利用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包,但会不会影响程序的最终效果就不清楚了,建议都填上。最后点确认,就可以等待程序的运行了。
运行结果:
(图里的时间对不上,是因为是我之前截的图)
结束
如有错误之处,请斧正。
边栏推荐
- 时序图数据建模与产业链分析
- Research Report on market supply and demand and strategy of China's plastics and polymer industry
- 中信证券网上开户安全吗 开户收费吗
- 整理混乱的头文件,我用include what you use
- C# 更加优质的操作MongoDB数据库
- Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
- Analysis of abnormal frequency of minor GC in container environment
- tp配置多数据库
- 2022年国内云管平台厂商哪家好?为什么?
- ~89 deformation translation
猜你喜欢

MVC模式和三层架构

Solution du système de gestion de la chaîne d'approvisionnement du parc logistique intelligent

It's too convenient. You can complete the code release and approval by nailing it!

嵌入式软件架构设计-函数调用

go-micro教程 — 第二章 go-micro v3 使用Gin、Etcd

Embedded software architecture design - function call

整理混乱的头文件,我用include what you use

Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection

Detailed process of DC-2 range construction and penetration practice (DC range Series)

How to implement a delay queue?
随机推荐
同构图与异构图CYPHER-TASK设计与TASK锁机制
网页游戏引擎
Visual studio 2019 (localdb) mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports 782
Object. Usage of keys()
Visual Studio 2019 (LocalDB)MSSQLLocalDB SQL Server 2014 数据库版本为852无法打开,此服务器支持782
Can you really use MySQL explain?
整理混乱的头文件,我用include what you use
Yanwen logistics plans to be listed on Shenzhen Stock Exchange: it is mainly engaged in international express business, and its gross profit margin is far lower than the industry level
程序员怎么才能提高代码编写速度?
c# 实现定义一套中间SQL可以跨库执行的SQL语句
Spark 中的 Rebalance 操作以及与Repartition操作的区别
Sql实现Split
MD5加密的两种方式
力扣今日题-1200. 最小绝对差
PingCode 性能测试之负载测试实践
detectron2安装方法
线性时间排序
安信证券属于什么档次 开户安全吗
聊聊异步编程的 7 种实现方式
VMware Tools和open-vm-tools的安装与使用:解决虚拟机不全屏和无法传输文件的问题