It would be great if the module provided a drush command, so that the drush comman can be added to crontab in order to run at a designated time. This would also be important for intranet sites, since I can designate a time that is outside of working hours.
Thanks in advance for the feature request consideration.
Issue fork cleaner-2912303
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nancydruI do not use Drush, so I cannot do that part. However, the module runs on Cron, so setting a specific time requires that Cron run at that time.
Comment #3
valentine94I'm gonna add this for D8 version and then add a backport for D7
Also I think for D8 would be really great to have both Drush and Drupal Console commands because some developers are prefer to use Console instead of Drush in most cases
Comment #4
valentine94Comment #5
valentine94Comment #7
sergeydruua commentedI have implemented the requested Drush command to allow manual execution of cleaner tasks.
Changes included:
Added src/Commands/CleanerCommands.php which dispatches the cleaner.run event.
Added drush.services.yml to register the command service correctly.
Usage: You can now run cleaner tasks manually regardless of the cron interval settings using: drush cleaner:run
Or use the alias: drush clean
This command triggers the standard CleanerRunEvent::CLEANER_RUN event, so all subscribers (cache clearing, watchdog clearing, etc.) will execute as configured.
Ready for review and testing.
Comment #10
valentine94Merged to DEV branch, thanks