Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28531

Automated backups run not on the time they are scheduled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.2.5, 2.3.2
    • 2.0.3, 2.1, 2.2.4, 2.3.1
    • Backup
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-28531-master
    • Hide

      Test pre-requisites

      1. Enable automated backups (Settings > Site administration > Courses > Backups > Automated backup setup)
      2. Set the cron time to 6pm (or any time later than now)
      3. Enable today's day and Sunday
      4. Set your admin's user to server timezone (Settings > My profile settings > Edit profile)
      5. Your server timezone should be Australia/Perth (This is you machine setting)
      6. Tests are to be run one after the other (without reset except if specified)

      Test 1

      1. Create two new courses, one has to be hidden
      2. Run the cron
      3. Go to the backup report (Settings > Site administration > Reports > Backups)
      4. Make sure boths courses have been skipped
      5. Make sure they're set to run today at 6pm

      Test 2

      1. Create a new course
      2. Run the cron
      3. Go to the backup report
      4. Make sure all the courses have been skipped
      5. Make sure all the courses are scheduled for today at 6pm

      Test 3

      1. Change your system time to 7pm
      2. Run the cron
      3. Go to the backup report
      4. Make sure courses have been backed up
      5. Make sure courses are scheduled for Sunday at 6pm

      Test 4

      1. Reset your system to the correct time/date
      2. Change your admin's timezone to UTC-2
      3. Run the cron
      4. In the cron output, make sure courses are scheduled for tomorrow at 4am
      5. Go to the backup report
      6. Make sure courses are skipped
      7. Make sure they are scheduled for today at 6pm

      Test 5

      1. Change your system time to tomorrow at 5am
      2. Run the cron
      3. In the cron output, make sure courses are scheduled for Monday, 4 am
      4. Go to the backup report
      5. Make sure courses are backed up
      6. Make sure they are rescheduled for Sunday at 6am

      Test 6

      1. Run the Backup Unit Tests and make sure none fails
      2. `phpunit` or Site Administration > Development > Unit Tests in 2.2
      Show
      Test pre-requisites Enable automated backups (Settings > Site administration > Courses > Backups > Automated backup setup) Set the cron time to 6pm (or any time later than now) Enable today's day and Sunday Set your admin's user to server timezone (Settings > My profile settings > Edit profile) Your server timezone should be Australia/Perth (This is you machine setting) Tests are to be run one after the other (without reset except if specified) Test 1 Create two new courses, one has to be hidden Run the cron Go to the backup report (Settings > Site administration > Reports > Backups) Make sure boths courses have been skipped Make sure they're set to run today at 6pm Test 2 Create a new course Run the cron Go to the backup report Make sure all the courses have been skipped Make sure all the courses are scheduled for today at 6pm Test 3 Change your system time to 7pm Run the cron Go to the backup report Make sure courses have been backed up Make sure courses are scheduled for Sunday at 6pm Test 4 Reset your system to the correct time/date Change your admin's timezone to UTC-2 Run the cron In the cron output, make sure courses are scheduled for tomorrow at 4am Go to the backup report Make sure courses are skipped Make sure they are scheduled for today at 6pm Test 5 Change your system time to tomorrow at 5am Run the cron In the cron output, make sure courses are scheduled for Monday, 4 am Go to the backup report Make sure courses are backed up Make sure they are rescheduled for Sunday at 6am Test 6 Run the Backup Unit Tests and make sure none fails `phpunit` or Site Administration > Development > Unit Tests in 2.2

      There are some bugs in backup_cron_automated_helper::calculate_next_automated_backup, causing the errors in calculation of the next backup time.

      Also if the automatic backup is enabled but no week days for it are selected, the backup still runs.

      Patch and unittest are provided.

            fred Frédéric Massart
            marina Marina Glancy
            Rajesh Taneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jason Fowler Jason Fowler
            Votes:
            12 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.