Base de conhecimento

1000 perguntas frequentes, 500 tutoriais e vídeos explicativos. Aqui, você encontra apenas soluções!

Using Crontab on Cloud Server

This guide details the use of Crontab (crons via SSH), available only on Managed Cloud Server, by default (there is also a task scheduler for all hosting).

 

Prerequisites

  • The script files called by the cron must be executable (CHMOD).

 

Full path

Cron tasks do not know the absolute path. Calling PHP without specifying the full paths to the executable makes it impossible to execute the task. You must specify

/opt/phpX.X/bin/php

by replacing X.X with the desired PHP version (/opt/php8.1/bin/php for example).

 

Other operations

For example:

  • List the crons of the SSH user in question:

    crontab -l -u Username
  • Edit the crons:

    crontab -e -u Username
  • 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 the crons of the last 7 days (once a day). In case of accidental deletion, contact Infomaniak support to request a restoration specifying the time and date of the deletion.

Link para esta FAQ: https://faq.infomaniak.com/350


Esta seção de perguntas frequentes foi útil?