Skip to content
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
20 changes: 20 additions & 0 deletions content/docs/cronjobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,23 @@ runtime:
```

A description of the crontab syntax that is required to define schedules can be found [here](https://www.adminschoice.com/crontab-quick-reference).

# Example of a Cron Job for Running a PHP Script

To run a PHP command using a specific version, you need to provide the absolute path to the desired PHP version. Below is a list of the available versions:

- `/usr/bin/php8.0-cli`
- `/usr/bin/php8.1-cli`
- `/usr/bin/php8.2-cli`
- `/usr/bin/php8.3-cli`
- `/usr/bin/php8.4-cli`

Below is an example configuration of a cron job that uses the `/usr/bin/php8.3-cli` version to execute a script:

```yaml
runtime:
cron-jobs:
- command: /usr/bin/php8.3-cli $HOME/htdocs/"path/to/your/script"
schedule: "* * * * *" # runs every minute
```
With this configuration, the cron job will run every minute using the specified PHP version to execute the script located at $HOME/htdocs/"path/to/your/script".
Loading