Cronjobs with php?

  • Hi there i have bought the instant SSH and the cronjobs plugin but my customer cant run a simple php command?


    Could not open input file: /var/www/virtual/ketzen.com/billing/htdocs/crons/pop.php


    I ran it in ssh and it works fine


    and through the jailed SSH I get


    -bash: php: command not found


    how can i fix this?


    the cron is */5 * * * * php -q /var/www/virtual/ketzen.com/billing/htdocs/crons/pop.php

  • Hello MoosehMan,


    which level has your customer for running cronjobs (cronjob type)? If set to full or jailed it should be possible. If set to URL you only can run jobs by passing a URL.


    Regards Jörg

    (Ubuntu 16.04, i-MSCP 1.5.1, php-Fpm, Plugins: ClamAV, CronJobs, InstantSSH, LetsEncrypt, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, PolicydSPF, Postscreen, RecaptchaPMA, RoundcubePlugins, ServerDefaultPage, SpamAssassin, YubiKeyAuth)

  • Hi,


    sounds like the cron is not able to find php - perhaps it is not in the PATH - try to call it with the complete path of your php binary.


    Regards Jörg

    (Ubuntu 16.04, i-MSCP 1.5.1, php-Fpm, Plugins: ClamAV, CronJobs, InstantSSH, LetsEncrypt, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, PolicydSPF, Postscreen, RecaptchaPMA, RoundcubePlugins, ServerDefaultPage, SpamAssassin, YubiKeyAuth)


  • your cron sohud be like (with path to the binary of php):

    Code
    1. */5 * * * * /usr/bin/php -q /var/www/virtual/ketzen.com/billing/htdocs/crons/pop.php