+30.2152151245-8 abuse@cms39.com

From the site folder, php cms39 list shows every command and php cms39 help <command> shows the options of one.

Built-in commands

cache:clearclear the cache (all or per tag)
cronscheduled tasks of every plugin
plugins:listplugins and whether they are active
docs:indexthe generated index of functions, hooks and tables
i18n:scantranslation keys that are missing or unused

Cron

One scheduled task on the server (e.g. every 5 minutes) runs all periodic tasks:

*/5 * * * * /opt/plesk/php/8.5/bin/php /var/www/vhosts/site.gr/httpdocs/cms39 cron
// from a plugin
add_action('cms39_cli_cron', function () {
    booking_send_reminders();
});

Your own command

add_filter('cms39_cli_commands', function (array $c) {
    $c['booking:reminders'] = [
        'description' => 'Sends reminders for tomorrow\'s bookings',
        'usage'       => '[--dry-run]',
        'options'     => ['dry-run' => 'Show only, do not send'],
    ];
    return $c;
});

function cms39_cli_booking_reminders(array $args): int
{
    cms39_cli_line('Sending…');
    return 0;   // 0 = success
}

Commands run as "system", without login, and log to tmp/logs/cli.log.

for more information contact us by
E-MAIL or by phone at (+30) +30.2152151245-8