Schedules allow you to automate the execution of your scripts at specific times or intervals, ensuring your cloud servers run tasks exactly when you need them to.

Creating a Schedule

  1. Navigate to Schedules: In your CloudRay dashboard, go to the “Schedules” tab.

  2. Click “Add Schedule”: Start creating a new schedule.

  3. Fill in the Form Fields:

    • Server: Select the server where you want the script to run.
    • Script: Choose the script you want to execute.
    • Variable Group (Optional): If your script uses variables, select the relevant variable group.
    • Repeat Options: Choose how often you want the script to run:
      • Every N hours: Specify the number of hours between executions (minimum 1 hour).
      • Every N days at HH:mm: Specify the number of days and the exact time (in UTC) for daily execution.
      • Every week on selected weekdays at given time in HH:mm: Choose the days of the week and the time (in UTC) for weekly execution.
      • Every month on selected day at given time in HH:mm: Choose the day of the month and the time (in UTC) for monthly execution.
  4. Save Schedule: Click “Save Schedule” to activate your new schedule.

Important Considerations:

  • Time Zone: All scheduled times are in UTC.
  • Potential Delays: If CloudRay is under heavy load, your scheduled runlogs might be slightly delayed.
  • Concurrent Script Execution: If another script is already running on the selected server, your scheduled script will be queued but might experience a longer wait time.
  • Minimum Interval: The shortest repeat interval you can set is 1 hour.

Example:

To run a backup script every day at 3:00 AM UTC on your “Production Server”, you would:

  1. Select “Production Server” in the “Server” field.
  2. Choose your “Backup Script” in the “Script” field.
  3. Select “Every N days at HH:mm” in the “Repeat Options”.
  4. Enter “1” for N and “03:00” for the time.
  5. Click “Save Schedule”.

Now your backup script will run automatically every day at 3:00 AM UTC.