Take backup at evening time using cronjob

Take backup at evening time using cronjob

To set up a backup in the evening using a CRON Job, follow these steps:

  1. Open a terminal on your Linux system.

  2. Type the following command to edit the crontab file:

     crontab -e
    
  3. The crontab file will open in your default editor.

  4. Add the following line to the crontab file to schedule the backup at evening time:

     0 18 * * * /path/to/backup_script.sh
    

    In this example, the backup script (backup_script.sh) will run every day at 6:00 PM (18:00). Change the time (hour and minute) to match your preferred evening time.

    Remember to give the right path to your backup script.

  5. Save the crontab file and exit the editor.

Now, the backup script will run automatically at the chosen evening time. Change the script to fit your backup needs.