• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Question Create Cron Task

Farid

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
18.0.57 Update #5
Hi,
I created a script on my commands folder and add it to kernel file.
Now I want to create a Cron Task for this script but I don't know which option should I use between 'Run a command' and 'Run PHP Script'.
And I don't know exactly how to retrieve correct information to put inside these fields...

Architecture is something like this:

Home Directory/MyDomain/Mysubdomaine/applicationapi/app/console/commands/PurgeOldLogs

I'm using Plesk Linux Obsidian.

Could anyone help me?
 
Is it a PHP script or is it a shell script? For PHP scripts, it is best to choose the "Run PHP Script" option, for others the "Run a command" option. To address the script, it normally works most reliably to put the fully qualified path into the input box, e.g. /var/www/vhosts/<your subscription>/<your domain's document root>/subdirectory/file.php.
 
Is it a PHP script or is it a shell script? For PHP scripts, it is best to choose the "Run PHP Script" option, for others the "Run a command" option. To address the script, it normally works most reliably to put the fully qualified path into the input box, e.g. /var/www/vhosts/<your subscription>/<your domain's document root>/subdirectory/file.php.
I am trying to do php script, would it be /var/www/vhosts/mydomain.com/httpdocs/directory/file.php
 
You can either specificy the full path as suggested or you can start from httpdocs (without slash in that case).
 
Back
Top