• Resolved neilgee

    (@neilgee)


    Hi,

    I am getting an error on the cron job for preload:

    So I am calling the URL with php but bash sees the dynamic parameters as command not found

    And the command line is expecting an input at the end – this happens both as a cron job and when run directly in the command line

    [websit10@byn03be ~]$ /usr/bin/php -q https://website.com?swcfpc=1&swcfpc-preloader=1&swcfpc-sec-key=1234567
    [1] 164948
    [2] 164949
    bash: swcfpc-preloader=1: command not found
    bash: swcfpc-sec-key=1234567: command not found
    [2]+  Exit 127                swcfpc-preloader=1
    [websit10@byn03be ~]$ No input file specified.

    How to rectify

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @neilgee,
    Huh! That is wired. What happens when you open that URL in the browser? Also, have you tried running the corm via WP CLI?

    Finally, I would personally suggest you not to use the preloaded as it will but give you any value at this current time. Cloudflare systems have become quite smart using AI and they don’t cache requests coming via cURL.

    I personally don’t use it on any of my sites.

    Thread Starter neilgee

    (@neilgee)

    In the browser it works ok and returns ‘Preloader started’

    But would be great to get this working as a cron job

    Plugin Contributor iSaumya

    (@isaumya)

    Huh! That’s wired. Cause if it’s working in the browser, then it should definitely work in cron as well. Can you try setting up the corn in some other test server? I honestly have no idea what can cause this as the URL is working properly.

    When you are running the cron, make sure that the cron has access to PHP to execute PHP codes in the corn job.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Query on preload Cron Job’ is closed to new replies.