1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Using Crontab on Cloud Server
This guide details the use of Crontab (crons via SSH), available only on Serveur Cloud, by default (there is also a task scheduler for all hosting).
Prerequisites
- The script files called by the cron must be executable (CHMOD).
Absolute path
Cron tasks are not aware of the absolute path. Calling PHP without specifying the full paths to the executable therefore makes it impossible to execute the task.
It is necessary to specify
/opt/phpX.X/bin/php
by replacing X.X
with the desired PHP version (/opt/php7.1/bin/php
for example).
Other operations
List the crons for the SSH user in question:
crontab -l -u NomUtilisateurSSH
Edit the crons:
crontab -e -u NomUtilisateurSSH
To be notified by email of the result of your cron tasks (to be added at the beginning of the file):
MAILTO=e-mail@domain.xyz
Restore a backup
Infomaniak backs up crons for the last 7 days (once a day). In case of accidental deletion, contact Infomaniak support to request a restoration by specifying the time and date of the deletion.