You’ll need to define the HMBKP_SCHEDULE_TIME constant yourself in wp-config with the time you want the backups to occur.
define( 'HMBKP_SCHEDULE_TIME', '07:45' );
Ok, I understand that. But, how do I define multiple constants for multiple schedule times?
I basically use two schedules: one daily “database only” backup (at 11:55pm) and a monthly (1st of each month) “files only” backup (at 11pm). If I set both to the same time, on the day of the “files only” backup it would happen at the same time of the “database only” backup.
How do I prevent that?
What about setting the time in the settings page, instead of using a constant? In this case, the constant would define only the default time, on the creation of a new schedule. What do you think? 😉
There is no way to have different times per schedule currently.
I will introduce a UI for controlling this at some point.
Ok, thanks. Two questions, though:
1. Is there a problem with two schedules happening at the same time (low resources, for example)?
I found out that Crontrol CAN change the day of the monthly schedule, but can’t change the time.
2. So, I was just looking at the options table on my database and found the two schedules. But I could NOT find the time of execution. Isn’t it recorded somewhere?
Cron won’t let 2 schedules run at exactly the same time, they will run one after the other.
The time is stored as part of the cron.
As part of the entry “hmbkp_schedule_default-#”?
It’s stored in the cron
row in the wp_options
table.
Thanks! I’ll use it this way for now and will wait for the schedule controlling UI.