Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32441

    Hi there.

    I am trying to get a cronjob to work. I can add it without any major problems, the server does not report an error but the script renders no visual results.

    This it how the script looks in my Hetzner controlpanel:
    * * * * * /usr/bin/php71 curl -silent -A ‘Mozilla’ ‘https://mydomain.dk/?c=1&ss_c=73bc68ecac670201987d’ >/dev/null 2>&1

    if I run the script manually the path in my browser (where i get visual results) looks like this:
    https://mydomain.dk/?c=1&ss_c=73bc68ecac670201987d&ss_imm=1

    any suggestions?

    sidenote: The controlpanel states that it only accepts 2 hour intervals as minimum but if I manually edited the string from stating 01*/02 * * * to * * * * * then it runs every minute according to the log file.

    #32442

    Through trial and error method I managed to solve my problem. The thing is that i was not supposed to chose the php path in the cpanel. When i deleted the /usr/bin/php* from the path I got the result I needed. Now the cronjob is running smoothly.

    #32445
    Profile photo of Robin
    Robin
    Keymaster

    Hi Runolfur,

    Glad it got sorted – yeah, it’s just pulling a URL from the web, not running a PHP script so removing the PHP parser from the path should fix it.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.