• WP 6.5.2 Using Rocky Linux 8 WP  (PHP 7.4)
    
    On an existing website we started getting this error to the Admin in email. Not sure when it started so may have happened with an update.
    
    /bin/sh: /home/www//wp-cron.php: Permission denied
    
    When I allow permission I get this:
    
    /home/www//wp-cron.php: line 1: ?php: No such file or directory
    /home/www//wp-cron.php: line 2: /bin: Is a directory
    /home/www//wp-cron.php: line 3: bin: command not found
    /home/www//wp-cron.php: line 4: bin: command not found
    /home/www//wp-cron.php: line 5: bin: command not found
    /home/www//wp-cron.php: line 6: bin: command not found
    /home/www//wp-cron.php: line 7: bin: command not found
    /home/www//wp-cron.php: line 8: bin: command not found
    /home/www//wp-cron.php: line 9: bin: command not found
    /home/www//wp-cron.php: line 10: bin: command not found
    /home/www//wp-cron.php: line 11: bin: command not found
    /home/www//wp-cron.php: line 12: bin: command not found
    /home/www//wp-cron.php: line 13: bin: command not found
    /home/www//wp-cron.php: line 14: bin: command not found
    /home/www//wp-cron.php: line 15: bin: command not found
    /home/www//wp-cron.php: line 16: bin: command not found
    /home/www//wp-cron.php: line 17: bin/: Is a directory
    /home/www//wp-cron.php: line 19: syntax error near unexpected token true' /home/www/<domain>/wp-cron.php: line 19:ignore_user_abort( true );'
    
    The email comes at 10 minutes after the hour but when I look into the cron assignments, none start anywhere near that time
    
    The only hourly was "wp_privacy_delete_old_export_files" which I disabled and still got the email at 10 minutes past the hour.
    
    There does not appear to be a hosting cron installed.
    
    I am assuming there is a pointer missing somewhere and the script is not pulling the data from the cron table.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you running wp-cron.php via system-cronjob? What is the command you are using there (even if it may not fit in time)?

    Also take a look at the error log of the web server to see if anything is recorded there. If it is a cronjob call, there should be nothing there. If it is, the request comes in via the web.

    Thread Starter lavarock7

    (@lavarock7)

    There appears to be no webhost cron, just what is in WordPress.

    I do see this inthe log. The actual email I get is always at 10 minutes past the hour.

    • [Mon May 06 04:02:09 2024] “POST /wp-cron.php?doing_wp_cron=1714968129.2111821174621582031250 HTTP/1.1” 200 0 “-” “WordPress/6.5.2; https:// REDACTED DOMAIN”
      172.70.126.189 – – [Mon May 06 04:02:08 2024] “GET /category/uncategorized/feed/ HTTP/1.1” 200 0 “-” “Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])”
      172.70.178.69 – – [Mon May 06 04:19:59 2024] “GET /cron.jpg HTTP/1.1” 200 155167 “https://www.ads-software.com/&#8221; “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0”
    Thread Starter lavarock7

    (@lavarock7)

    I guess the odd thing that got me looking is that the top of the wp-cron.php file looks like this:

    <?php
    /**

    • A pseudo-cron daemon for scheduling WordPress tasks.
      *
    • WP-Cron is triggered when the site receives a visit. In the scenario
    • where a site may not receive enough visits to execute scheduled tasks
    • in a timely manner, this file can be called directly or via a server
    • cron daemon for X number of times.
      *
    • Defining DISABLE_WP_CRON as true and calling this file directly are
    • mutually exclusive and the latter does not rely on the former to work.
      *
    • The HTTP request to this file will not slow down the visitor who happens to
    • visit when a scheduled cron event runs.
      *
    • @package WordPress
      */

    ignore_user_abort( true );

    and it looks as though the cron process is reading its own script and generaing the errors as it tries to execute each line?

    /home/www//wp-cron.php: line 1: ?php: No such file or directory
    /home/www//wp-cron.php: line 2: /bin: Is a directory
    /home/www//wp-cron.php: line 3: bin: command not found

    Deactivate WP’s own cron as described here: https://kinsta.com/knowledgebase/disable-wp-cron/

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.