We had a problem with nodes published using scheduler not appearing because of the page cache, which required clearing caches on publish. Fortunately this module provides a configuration option to do exactly that! But we didn't find it at first because we're not using the builtin lightweight cron, but instead managing this cron task using elysia cron. We also needed to log scheduler actions to help debug this, but were confused because those also appear in the lightweight cron settings page. But when we started to dig in the code we discovered how to do this. The UX issue is that the options "Log every activation and completion message" and "Clear all expired block and page caches after publishing or unpublishing via cron" should probably be moved to admin/config/content/scheduler from admin/config/content/scheduler/cron to make it clear that they apply regardless of whether lightweight cron is used.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2947370-3.move-cache-option.patch | 2.65 KB | jonathan1055 |
Comments
Comment #2
jonathan1055 commentedHi mvc,
Thanks for raising this. I've checked the code and you are right that the option to clear the cache is effective for both the full Drupal cron run and the Scheduler lightweight cron.
However, the 'Log every activation and completion message.' option is specific to just the lightweight cron. The full drupal cron writes it's own "Cron run completed" log message, so Scheduler only needs this option when not doing the full cron. The log messages are only written out when running the lightweight cron, the option has no effect when doing a full Drupal cron.
So yes I think we should move the cache option to the main page, but the log option will stay where it is. It would also be good to have a specific "cache cleared" message if that is actully done, so that admins can see what is happening.
Jonathan
Comment #3
jonathan1055 commentedHere's a patch which moves the cache-clear option and also writes a dblog watchdog message if the cache is cleared.
For reference: #2377201: Introduce an option to cache_clear_all() on Scheduler cron is the original issue when we added this option. The option is not requied in 8.x so we can fix this just at at 7.x.
Comment #4
mvcThat was fast :)
Ah, I was thinking of the "@Type: scheduled [un]publishing of %title" messages, but I see now that the option just controls the "lightweight cron run activated" message. This patch looks great to me, thanks!
Comment #5
chris matthews commentedWould it be possible to commit the patch in #3 to 7.x-1.x-dev and tag a 7.x-1.6 release? Maybe some of the patches that need review can get in this release as well.
Comment #7
jonathan1055 commentedFixed! Sorry about the delay.