当前位置:网站首页>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
- C语言指针(中篇)
- JVM 垃圾回收 详细学习笔记(二)
- Simulation volume leetcode [general] 1706 Where does the ball meet
- Original collection of hardware bear (updated on June 2022)
- Upgrade Alibaba cloud RDS (relational database service) instance to com mysql. jdbc. exceptions. Troubleshooting of jdbc4.communicationsexception
- Leetcode question brushing record (array) combination sum, combination sum II
- STM32 serial port register library function configuration method
- [istio introduction, architecture, components]
- Three updates to build applications for different types of devices | 2022 i/o key review
猜你喜欢

C language pointer (exercises)

C language for calculating the product of two matrices

Port multiplexing and re imaging

E-commerce campaign Guide

Locust performance test 4 (custom load Policy)

面板显示技术:LCD与OLED

Storage of data in memory

PMP Exam Preparation experience systematically improve project management knowledge through learning

H3C VXLAN配置

数据在内存中的存储
随机推荐
On December 8th, 2020, the memory of marketing MRC application suddenly increased, resulting in system oom
Esp32-ulp coprocessor low power mode RTC GPIO interrupt wake up
串口实验——简单数据收发
systemd
Personal deduction topic classification record
【ChaosBlade:节点 CPU 负载、节点网络延迟、节点网络丢包、节点域名访问异常】
模拟卷Leetcode【普通】1557. 可以到达所有点的最少点数目
Output all composite numbers between 6 and 1000
Un salaire annuel de 50 W Ali P8 vous montrera comment passer du test
实现自定义内存分配器
Unity Shader入门精要初级篇(一)-- 基础光照笔记
Screen automatically generates database documents
Platformization, a fulcrum of strong chain complementing chain
STM32的时钟系统
【ChaosBlade:节点磁盘填充、杀节点上指定进程、挂起节点上指定进程】
年薪50w阿裏P8親自下場,教你如何從測試進階
What is the value of getting a PMP certificate?
Port occupation troubleshooting
模拟卷Leetcode【普通】1706. 球会落何处
[istio introduction, architecture, components]