当前位置:网站首页>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 .
边栏推荐
- 串口實驗——簡單數據收發
- Hard core sharing: a common toolkit for hardware engineers
- 【istio简介、架构、组件】
- PMP examination experience sharing
- [chaosblade: node CPU load, node network delay, node network packet loss, node domain name access exception]
- What are the suggestions for PMP candidates?
- LeetCode 715. Range module
- 个人力扣题目分类记录
- Enterprise manager cannot connect to the database instance
- Original collection of hardware bear (updated on May 2022)
猜你喜欢

Several stages of PMP preparation study

2021 year end summary

Two schemes of unit test

串口實驗——簡單數據收發

Three updates to build applications for different types of devices | 2022 i/o key review

Serial port experiment - simple data sending and receiving

Why is access to the external network prohibited for internal services of the company?

PMP examination experience sharing

The longest ascending subsequence model acwing 1017 Strange thief Kidd's glider

Full link voltage test of the e-commerce campaign Guide
随机推荐
Locust performance test 2 (interface request)
2022-06-30 unity core 8 - model import
PMP experience learning and sharing process
Screen automatically generates database documents
Isomorphic C language
C language pointer (Part 2)
徽商期货公司评级是多少?开户安全吗?我想开户,可以吗?
5A summary: seven stages of PMP learning
Esp32-ulp coprocessor low power mode RTC GPIO interrupt wake up
PMP Exam details after the release of the new exam outline
Reflections on the way of enterprise IT architecture transformation (Alibaba's China Taiwan strategic thought and architecture practice)
Analysis of abnormal channel number information before and after AGC re signature service
MySQL主从延迟的解决方案
Locust performance test 3 (high concurrency, parameter correlation, assembly point)
Unityshader introduction essentials personal summary -- Basic chapter (I)
【Istio Network CRD VirtualService、Envoyfilter】
How to count the number of project code lines
How long does the PMP usually need to prepare for the exam in advance?
Goldbach conjecture C language
The essence of high availability