terra-ops / terra-cli

The Terra Command Line Interface
http://terra.readthedocs.org
GNU General Public License v2.0
48 stars 17 forks source link

Implement Cron #72

Open jonpugh opened 9 years ago

jonpugh commented 9 years ago

We need a nice common way of running cron.

I do not know yet if it would be best to run it on the host or in the container.

The drush container could have cron setup within it.

Let's take inspiration from platform.sh: https://github.com/platformsh/platformsh-examples/blob/drupal/7.x/.platform.app.yaml#L42

# The configuration of scheduled execution.
crons:
    drupal:
        spec: "*/20 * * * *"
        cmd: "cd public ; drush core-cron"
john-binaryfeline commented 9 years ago

I don't see how this can not be in the container. Containers should be redeployable to as yet unknown PaaS solutions, right? Since cron is part of the total app solution, it has to be in the container. Have I misunderstood the intent?

jonpugh commented 9 years ago

Very good point. We should put things into the containers as much as possible.

We do make some assumptions about the code being on the host and mounted via volume, but whenever possible, we should put things inside the container.