Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to run cron by loading bash shell #1365

Merged
merged 2 commits into from
Jun 15, 2020
Merged
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
8 changes: 8 additions & 0 deletions docs/content/service/cli/cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ A crontab file has six fields for specifying minute, hour, day of month, month,
+------------- min (0 - 59)
```

By default, cron runs commands through `/bin/sh` and can sometimes cause issues when trying to run commands that are
found within the `$PATH`. One recommendation is to wrap the commands in `bash -l -c` so that the profile can load. An
example of this would be using drush to run cron on a drupal website.

```bash
* * * * * bash -l -c 'drush --root=/var/www/docroot core:cron'
```

## Configuring Cron

Cron can be started within a project by creating a `crontab` file within the projects `.docksal/services/cli` folder.
Expand Down