Get the App
SLTechnology News&Howtos  ›  Servers  › 

Crontab is inconsistent with system time

Shulou Source: shulou.com Published: 2022-06-02 06:54:07 10月03日 Update

After migrating the online database to the virtual machine, the operation and maintenance staff did not change the time.

After the time modification is completed later, it will also be modified on the database, but the backup time of the scheduled task is not performed at 4: 00 in the morning, but at 12: 10 noon.

The reason is that crontab needs to be restarted after changing the time.

Modify database time

Set time_zone ='+ 08 00'

Set global time_zone ='+ 08 00'

Flush privielges

Restart crontab

/ etc/init.d/crond restart

Tags: Time data database task reason backup is in consistent system Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information macOS Redmi OPPO Reno