当前位置:网站首页>Regularly modify the system time of the computer
Regularly modify the system time of the computer
2022-07-07 09:10:00 【Stick to this persistence】
One 、 Preface
When developing tests , It is often necessary to change the server time according to the business scenario ,Java The current server time obtained by the development background is the system time of the computer , Manual change is too troublesome , So I wrote a timed script , Double click to execute .
Two 、 Code implementation
newly build changeTime.bat file , The contents are as follows :
@date 2020-01-01
@time 9:00
@echo off
:begin
echo wscript.echo DateAdd("d",1,date) >$.vbs
for /f "delims=" %%a in ('cscript /nologo $.vbs') do date %%a
del $.vbs
@time 9:00
ping -n 60 127.1>nul
goto begin
explain : from 2020-01-02 9:00 Start , Change server time , Every time 1 minute (60 second )(ping -n 60 127.1) Automatically +1 God .
3、 ... and 、 test
double-click changeTime.bat, See the effect .
边栏推荐
- 个人力扣题目分类记录
- Druid monitoring - Introduction to JMX usage and principle
- RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (5 x 5). Kernel size c
- C language pointer (Part 1)
- ESP32-ULP协处理器低功耗模式RTC GPIO中断唤醒
- How can I apply for a PMP certificate?
- How to realize sliding operation component in fast application
- Systick tick timer
- GoLand set goproxy
- Summary of PMP learning materials
猜你喜欢
C language pointer (special article)
2022-06-30 Unity核心8——模型导入
Interview question: general layout and wiring principles of high-speed PCB
C language for calculating the product of two matrices
JVM garbage collection detailed learning notes (II)
LeetCode 715. Range module
硬核分享:硬件工程师常用工具包
Systick滴答定时器
C语言指针(下篇)
Locust performance test 2 (interface request)
随机推荐
PPT模板、素材下载网站(纯干货,建议收藏)
Hard core sharing: a common toolkit for hardware engineers
LeetCode 715. Range module
LED模拟与数字调光
Full link voltage test of the e-commerce campaign Guide
How to count the number of project code lines
2020 year end summary
5A summary: seven stages of PMP learning
Locust performance test 3 (high concurrency, parameter correlation, assembly point)
【Istio Network CRD VirtualService、Envoyfilter】
硬件大熊原创合集(2022/05更新)
模拟卷Leetcode【普通】1557. 可以到达所有点的最少点数目
GoLand set goproxy
systemd
Simulation volume leetcode [general] 1609 Parity tree
JVM 内存结构 详细学习笔记(一)
NVIC中断优先级管理
Simulation volume leetcode [general] 1557 The minimum number of points that can reach all points
Two schemes of unit test
Do you have any certificates with high gold content?