Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions src/cloud/docker/docker-manage-cron-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,22 @@ The Magento cron implementation has the following limitations:
- The `setup:cron:run` and `cron:update` commands are not available on Cloud and Docker for Cloud environments
- In the Docker environment, cron works only with the CLI container to run the `./bin/magento cron:run` command

**To view the cron log:**
To improve the overall performance in the Docker development and production environments, the Cron container is not present by default. You can add the cron container as needed by adding the `--with-cron` option to the Docker build command.

```bash
docker-compose run deploy bash -c "cat /app/var/cron.log"
./vendor/bin/ece-docker build:compose --mode="developer" --with-cron --sync-engine="mutagen"
```

**To run cron jobs manually:**
**To view the cron log:**

```bash
docker-compose run cron /usr/local/bin/php bin/magento cron:run
```

## Disable the Cron container

If cron runs cause a performance problem, you can prevent the Cron container from running automatically by adding the following snippet to your `docker-compose.override.yml` file.

```yaml
cron:
entrypoint: "bash -c"
docker-compose run deploy bash -c "cat /app/var/cron.log"
```

After disabling the Cron container, use `docker-compose` to run cron jobs manually.

## Remove the cron container

Improve performance in your Docker development environment by build the Cloud Docker environment without a Cron container.
**To run cron jobs manually:**

```bash
./vendor/bin/ece-docker build:compose --mode="developer" `--no-cron` --sync-engine="mutagen"
docker-compose run cron /usr/local/bin/php bin/magento cron:run
```

[Cron container]: {{site.baseurl}}/cloud/docker/docker-containers-cli.html
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/docker/docker-mftf.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To set up and run MFTF tests in a Cloud Docker environment:
1. Generate the `docker-compose.yml` file.

```bash
./vendor/bin/ece-docker build:compose --with-selenium --no-cron
./vendor/bin/ece-docker build:compose --with-selenium
```

1. Start the {{site.data.var.mcd-prod}} environment. Optionally, you can set up {{site.data.var.mcd-prod}} to work in [Developer Mode].
Expand Down