当前位置:网站首页>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 .
边栏推荐
- OpenGL三维图形绘制
- C language pointer (Part 2)
- PMP experience learning and sharing process
- STM32的时钟系统
- 使用Typora编辑markdown上传CSDN时图片大小调整麻烦问题
- On December 8th, 2020, the memory of marketing MRC application suddenly increased, resulting in system oom
- 【ChaosBlade:根据标签删除POD、Pod 域名访问异常场景、Pod 文件系统 I/O 故障场景】
- Chaosblade: introduction to chaos Engineering (I)
- C language pointer (Part 1)
- 5A summary: seven stages of PMP learning
猜你喜欢
ESP32-ULP协处理器低功耗模式RTC GPIO中断唤醒
LeetCode 715. Range 模块
Locust performance test 4 (custom load Policy)
Storage of data in memory
Screen automatically generates database documents
Do you have any certificates with high gold content?
JVM 垃圾回收 详细学习笔记(二)
Two schemes of unit test
Digital triangle model acwing 1027 Grid access
Markdown editor Use of MD plug-in
随机推荐
[chaosblade: node disk filling, killing the specified process on the node, suspending the specified process on the node]
Enterprise manager cannot connect to the database instance
C language pointer (Part 2)
Vagrant failed to mount directory mount: unknown filesystem type 'vboxsf'
面板显示技术:LCD与OLED
Simulation volume leetcode [general] 1567 Length of the longest subarray whose product is a positive number
MySQL master-slave delay solution
Personal deduction topic classification record
Problems encountered in the use of go micro
Isomorphic C language
STM32 serial port register library function configuration method
Selenium mouse sliding operation event
RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (5 x 5). Kernel size c
Analysis of abnormal channel number information before and after AGC re signature service
Several methods of calculating the average value of two numbers
Chaosblade: introduction to chaos Engineering (I)
OpenGL三维图形绘制
OpenGL 3D graphics rendering
Digital triangle model acwing 275 Pass a note
Hard core sharing: a common toolkit for hardware engineers