Forum

Thread tagged as: Question, Runway, Backup

runway backup plan schedule being ignored and run more frequently

I'm clearly missing something about using the scheduled tasks but I just can't get it.

I have perch runway 3, backup is installed and running I've activated a weekly routine which backs up to dropbox, all good and working.

The site also has the Twitter addon installed and configured.

I've setup a cron job to run the scheduled tasks which it is doing every 24hrs, so I can pull in the Twitter posts daily. The problem is the backup routine is running every 24hrs also so ignoring the weekly routine set in the backup plan settings.

I have setup a custom secret in the config file but when I try to use that the cron job reports an error stating the secret was incorrect but it succeeds if I use the url and secret which is stated in the 'configuring scheduled tasks' section of 'settings > scheduled tasks'.

So I guess I just don't know how to apply the custom secret and how to get the backup to adhere to it's specified plan schedule (sorry to cram 2 questions in the one post).

Any pointers appreciated.

Graham Shedden

Graham Shedden 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You'll want to schedule cron to run more frequently. Runway will then manage what work gets done.

As for the backup, assets are backed up as needed, and the database is backed up on the schedule you specify.

Thanks Drew That's how I thought it would work but my weekly backup plan is getting run every 24 hours not the 168 hours specified in the plan and I can confirm this when I view the backup files in the linked dropbox folder.

Excuse my ignorance but why should the Cron be more frequent? It's unlikely with this website that the Twitter feed would be updated any more frequently and I was trying to be sparing with server resources (I know a single Cron would amount to much but you know - just trying to be nice). What, would be a more appropriate frequency?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you only run cron at the exact frequency of your least frequent task, you're potentially asking that one run to do a lot of work in the space of a single request. The chance of your script running out of memory or time is vastly increased. You're already asking the scheduler to:

  1. back up your assets
  2. back up your database
  3. poll Twitter for tweets

It makes no sense to me to ask your server to do all that work at once when you already have a way to nicely spread it out over time.

Running the scheduler when there's no work to do will have almost no. Less work than serving one web page.

Thank you.

Yes I understand what you're saying and why it would be more efficient but what I don't understand is how to get that to happen.

If I run the script every 1hr or 30 minutes from what I can see it will run the backup and twitter each time won't it?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, cron runs Runway's scheduler. Runway then decides what work should be done based on your configured options.

You need cron to be running the scheduler frequently to give Runway the opportunity to kick off tasks on the right schedule.

OK. I've updated the cron to run more frequently.