Skip to content

Commit ca75912

Browse files
Update cronjobs.md
1 parent b3bbae0 commit ca75912

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

content/docs/cronjobs.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,33 @@ runtime:
1919
```
2020

2121
A description of the crontab syntax that is required to define schedules can be found [here](https://www.adminschoice.com/crontab-quick-reference).
22+
23+
# Example of a Cron Job for Running a PHP Script
24+
25+
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:
26+
27+
- `/usr/bin/php4.4-cli`
28+
- `/usr/bin/php5.2-cli`
29+
- `/usr/bin/php5.4-cli`
30+
- `/usr/bin/php5.5-cli`
31+
- `/usr/bin/php5.6-cli`
32+
- `/usr/bin/php7.0-cli`
33+
- `/usr/bin/php7.1-cli`
34+
- `/usr/bin/php7.2-cli`
35+
- `/usr/bin/php7.3-cli`
36+
- `/usr/bin/php7.4-cli`
37+
- `/usr/bin/php8.0-cli`
38+
- `/usr/bin/php8.1-cli`
39+
- `/usr/bin/php8.2-cli`
40+
- `/usr/bin/php8.3-cli`
41+
- `/usr/bin/php8.4-cli`
42+
43+
Below is an example configuration of a cron job that uses the `/usr/bin/php8.3-cli` version to execute a script:
44+
45+
```yaml
46+
runtime:
47+
cron-jobs:
48+
- command: /usr/bin/php8.3-cli $HOME/htdocs/"path/to/your/script"
49+
schedule: "* * * * *" # runs every minute
50+
```
51+
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".

0 commit comments

Comments
 (0)