Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt
hiddentrue

Crons can be used to run scheduled jobs of your application. Crons are executed as www-data user.

Crons can be used to run scheduled jobs of your application. Crons are executed as www-data user. For further information how to schedule a cron, you may use https://crontab.guru/.

(warning) Please note that crons are not utilized any path variable. Commands are required to included full path like /usr/bin/php.


To create a cron job via PHP following commands are required:

Code Block
<? file_put_contents('/tmp/crontab.txt', '* * * * * NEW_CRON'.PHP_EOL); echo exec('crontab /tmp/crontab.txt'); ?>

The commands can also be verwendent to edit the crontab or delete them.

To delete  the crontab following command can be used:

Code Block
echo exec('crontab -r');


Related tutorials

Filter by label (Content by label)
showLabelsfalse
max10
showSpacefalse
cqllabel in ( "cron" , "php" , "deployment" ) and space = currentSpace ( ) and ancestor = "14756413452014352487"

Related

component documentation

components

Filter by label (Content by label)
showLabelsfalse
max10
showSpacefalse
cqllabel in ( "cron" , "php" , "deployment" ) and space = currentSpace ( ) and ancestor = "14749532172014350220"

Status
colourYellow
titleintermediate

Table of Contents
exclude(Related *|Table of Contents).*


Filter by label (Content by label)
showLabelsfalse
max10
showSpacefalse
sorttitle
titleRelated questions
cqllabel in ( "cron" , "php" , "deployment" ) and space = currentSpace ( ) and ancestor = "15395390302014351598"