Launch Drush command and/or migration on Cron Event

Created on 23 August 2024, 8 months ago

On Cron Event start a migration and/or Drush command

I want to automatize a migration (migrate module) every hour (with or without Drush command).

I see how to set a Cron event but not how to create a specific task for this. Do you have documentation to implement this type of element?

Thanks.

💬 Support request
Status

Active

Version

2.0

Component

Documentation

Created by

🇫🇷France kumkum29

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kumkum29
  • 🇩🇪Germany jurgenhaas Gottmadingen

    ECA is built such that you can build models with action plugins that get executed following certain events. So, the cron event is available, but there are no action plugins in Drupal core that would perform a migration. Such action plugins could be implemented into ECA, but I'm not sure that this is really needed.

    If you want to run regular migrations, you can do that without ECA but executing something like drush -y migrate:import --all with the system crontab. We're doing that in a lot of our projects and it works really nice. Therefore, I don't see the requirement for action plugins, unless you have a use case that I'm missing?

  • Status changed to Fixed 4 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024