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

Command icon 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

NWOM created an issue. See original summary.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

I 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.

valentine94’s picture

Version: 7.x-1.x-dev » 8.x-2.x-dev
Assigned: Unassigned » valentine94
Status: Postponed (maintainer needs more info) » Needs work
Issue tags: +Needs backport to D7

I'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

valentine94’s picture

Version: 8.x-2.x-dev » 3.0.x-dev
valentine94’s picture

Issue tags: -Needs backport to D7

sergeydruua made their first commit to this issue’s fork.

sergeydruua’s picture

Status: Needs work » Needs review

I 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.

  • sergeydruua committed 629b068c on 3.0.x
    Issue #2912303: Added drush command cleaner:run to execute tasks...
valentine94’s picture

Assigned: valentine94 » Unassigned
Status: Needs review » Fixed

Merged to DEV branch, thanks

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.