Recent Topics

1 Jul 10, 2015 23:13    

I have a v5.08 blog with a 421MB evo_sessions table which is maxing out my IOPS limit on my host when I try to mysqldump the db. Obviously I need to prune it. However, each of my blog posts shows the number of times it's been viewed and the count increments with each view. Does pruning hits & sessions reset those view counts to zero?

jj.

2 Jul 11, 2015 10:26

@jibberjab that job prunes records from evo_hitlog, evo_sessions and evo_basedomains, and the views count is saved into the evo_items__item table, so it's safe to execute the job.

As always, make sure to have a backup before to manipulate your data.

3 Jul 11, 2015 13:15

Thanks. I truncated them first via command line and have scheduled the task to run every 28 days for now.

Is there a way to isolate a specific schedule task (pruning hitlog and sessions) into its own cron job? I'd prefer to run that particular schedule on the 1st of every month, rather than every 7 or 30 days. The way scheduled tasks are set up in b2evo I don't see a way to do that since all the tasks are swept up by a single cronjob which runs cron_exec.php at regular intervals, rather than being able to execute specific schedule tasks individually...

jj.

4 Jul 13, 2015 07:30

@jibberjab: You're right, there is no way to set scheduled tasks into their own cron job. But, I don't understand why are trying to do that? You can set your cron, let's say, every 5 minutes, but if the next execution of "Prune hitlog and sessions" is scheduled to the 1st day of each month, it will be completed only on that cron execution, there is no need to set a different cron job only for that task.

5 Jul 13, 2015 13:16

How do you schedule "Prune hitlog and sessions" for the 1st of every month? When I edit the task, I only see a start date, start time, and repeat frequency. I can do "every 30 days" but not every month has 30 days, so it will quickly be skewed.

jj.

6 Jul 14, 2015 19:18

@jibberjab wrote:

I can do "every 30 days" but not every month has 30 days, so it will quickly be skewed.

You got me! :oops:

What if you set 12 different tasks (one for the first day of each month) and select a Repeat every value of 1 year? Does it make sense?

Maybe it's a bit annoying, but it took me 5 minutes to set all the jobs that you see in the screenshot above.

7 Jul 15, 2015 02:59

I like creative solutions like that.. it's a bit messy but probably the best approach given the limited options. Maybe it's a good feature request since "First day of the month" is a common scheduling cycle for these types of tasks.

jj.

8 Sep 20, 2015 18:53

I'd like to re-address this topic to make sure I understand how scheduled tasks are actually executed in relation to the underlying cron job, because I have a hosting account routinely hitting a 2048 IOPS limit and there are only 3 b2evo blogs running on the entire account. The traffic is still fairly low so the only thing the host and I can figure is that scheduled tasks are somehow accumulating inefficiently and creating a severe bottleneck on the db server...

If I have the following b2evo tasks scheduled:
Task 01: 02:00:00 repeat hourly
Task 02: 03:00:00 repeat daily

And a cron job set to run at
5

My questions and presumptions:

  1. At 02:00:00 no tasks are executed. Task 01 goes into a "waiting" state?
  2. At 02:05:00 Task 01 is executed?
  3. At 03:00:00 no tasks are executed. Task 01 and Task 02 go into a waiting state?
  4. At 03:05:00 Task 01 and Task 02 are executed?
  5. At 04:00:00 no tasks are executed. Task 01 goes into a waiting state?
  6. At 04:05:00 Task 01 is executed?

So basically, am I correct in that once a b2evo Scheduled Task trigger-time has been crossed, it waits for the next cron execution and then runs?
jj.


Form is loading...