Updated on 2023-05-29 GMT+08:00

Configuring Scheduled Tasks

If a backup task needs to be executed periodically, configure scheduled tasks using crontab on Linux to call the script. Before running the script, ensure that the database backup is complete. This script cannot identify whether the backup file is complete.

Procedure

  1. Edit the crontab file:

    crontab -e

    Set the scheduled task. Change the time according to the actual situation, save the modification, and exit.

    If the following information is displayed, the script will be called at 21:30 o'clock every day:

    30 21 * * * cd /opt/huawei/obsutil_adapter && python3 obsutil_adapter.py >/dev/null 2>&1

    The scheduled task execution time is defined by the customer. Ensure that the scheduled task execution time is later than the backup time.

  2. View scheduled tasks. If you can find the scheduled tasks in 1 by running the following command, it indicates that the setting is successful.

    crontab -l