Docs · Running your bot

Schedules: nightly restarts and timed tasks

All docs

A schedule runs one or more tasks at the times you choose. Open Schedules in the panel.

Example: restart the bot every night

  1. Press Create schedule.
  2. Give it a name, like Nightly restart.
  3. Set the time. The fields work like cron: for 05:00 every day, enter Minute 0, Hour 5, and * in Day of Month, Month and Day of Week.
  4. Leave Only When Server Is Online on, so a bot you stopped on purpose is not started again.
  5. Press Create schedule, then open the schedule and press New Task.
  6. Action: Send power action, then Restart. Save.

Times use the server clock, which runs on Central European Time (Europe/Berlin). 05:00 there is 04:00 in London and 23:00 the previous evening in New York.

Does a bot need a nightly restart? A well-behaved one does not. It is a reasonable patch for one that slowly uses more memory until it misbehaves, while you find out why.

Cron fields, briefly

  • * means every.
  • */15 in Minute means every 15 minutes.
  • 1-5 in Day of Week means Monday to Friday. 0 is Sunday.
  • 0 Minute and */6 Hour means every six hours, on the hour.

Task types

  • Send power action: start, stop, restart or kill.
  • Send command: sends a line of text to your program's input. Only useful if your bot reads input from the console, which most do not.
  • Create backup: takes a backup. It uses one of your backup slots, and fails if all of them are full, so this is rarely worth it on top of the automatic daily backup. See Backups.

A schedule can have several tasks. Each has a Time offset in seconds after the previous one, which is how you would, say, stop the bot, wait, take a backup, then start it again. Tick Continue on Failure if later tasks should still run when an earlier one fails.

Testing a schedule

Open the schedule and press Run Now. The tasks run immediately, and the Activity page records it.

Something here wrong or out of date? Tell us and it gets fixed.