Jump to content

Cron Job Issue " not at command line"


Recommended Posts

I have tasks running via Cron Job, as the software recommends - however, for some reason, task.php is not running properly and gives message "not at command line".  I have had my server support look at it and they tell me that the cron job is running properly, however, the task.php is not running as expected.   

I have copied the exact command and copied it to my cron, running every minute - but I always get the same message "not at command line"

I am running php version 8.2.0.  Any ideas?

Link to comment
Share on other sites

PHP 8.2 is not directly supported yet so I would recommend downgrading to PHP 8.1 or 8.0 first off. Second, could you please confirm that the command you are providing to CRON is that which is in ACP -> System -> Advanced Configuration? Ultimately, it sounds like the task is being executed as HTTP so would to ensure it is being ran via PHP in the command line.

Link to comment
Share on other sites

Jim, downgraded to 8.1.12 and it didn't seem to make a difference. 

 

I have this entered into the command field (site name was replaced by mywebsite). This is copied from the ACP. 

/usr/local/php81/bin/php -d memory_limit=-1 -d max_execution_time=0 /home/customer/www/mywebsite.com/public_html/applications/core/interface/task/task.php 1ff991c445e1dfacc7963576b00129b0

Link to comment
Share on other sites

6 minutes ago, brandoninsc said:

Jim, downgraded to 8.1.12 and it didn't seem to make a difference. 

 

I have this entered into the command field (site name was replaced by mywebsite). This is copied from the ACP. 

/usr/local/php81/bin/php -d memory_limit=-1 -d max_execution_time=0 /home/customer/www/mywebsite.com/public_html/applications/core/interface/task/task.php 1ff991c445e1dfacc7963576b00129b0

When saving your setting in the ACP, are you getting any errors?

Link to comment
Share on other sites

9 minutes ago, brandoninsc said:

I was afraid it would come to that.   I only came to Invision on this issue once they told me that everything was set up properly on their end and I'd need to contact the developer. 

Unfortunately, everything is executing properly on our end (you can actually run the command provided via SSH, if you access and it should render properly). This would, unfortunately, be a configuration error or issue with CRON if it is returning HTTP headers as it should be ran via PHP.

Link to comment
Share on other sites

  • 1 year later...

@brandoninsc, Not sure if you ever got to the bottom of this, but in case anyone else is looking - I just had the same issue running the cronjob with my hosting on Siteground and managed to find the solution with their support - the path to php (first bit of the cronjob) was different on the hosting than expected:
/usr/local/bin/php82
NOT:
/usr/local/php81/bin/php

Link to comment
Share on other sites

On 1/21/2024 at 6:20 PM, teraĂźyte said:

PHP 8.2 is not supported currently, though. If your site uses it, you should downgrade to PHP 8.1 instead. Otherwise, you might experience issues in some areas.

Thanks. It is working absolutely fine and i like to be ahead of the game if I can be! I will downgrade if I experience issues.

Link to comment
Share on other sites

8 minutes ago, lazzarus said:

Not broken yet....still on 8.2.

cbc kc GIF by Kim's Convenience

You're more than welcome to run at whatever PHP version makes your heart content 🙂 . Keep in mind though, there are likely errors, just not in your every day actions. Keeping an eye on your error logs and keeping abreast to any missing users may help you determine this. A forewarning though, if you come forth with a support ticket, the solution is going to downgrade PHP 🙂 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
Ă—
Ă—
  • Create New...