Bob Snow Posted July 22 Posted July 22 I keep getting the cron error. My site is in the development stage. I can't shake the cron error I have been getting over the years, so I decided to go with EasyCron. Still no luck. Here is what I get. I might mention it is totally Greek to me. Latest Execution Failures Cron Job Setting (Show) Lastest Execution Failures (Up to 20 logs) Schedule Time Start Time End Time Execution Time (second) HTTP Code Status Output 2024-07-04 02:58:00 CDT 2024-07-04 02:58:03 CDT 2024-07-04 02:58:03 CDT 0.140540 500 Failed Detail View Output Suggestions: Try increasing the timeout setting of your web server or script (instructions). You may ask your hosting guy to do it if you don't know how to. If your hosting has a firewall filtering external requests, ask them to white list our IPs. Problem persists? We're here to help.
Marc Posted July 22 Posted July 22 We need to know what the internal server error is that is being thrown, in order to advise accordingly. At present you have a "500" shown there, which would generally store on your server error logs
Bob Snow Posted July 22 Author Posted July 22 I decided not to use Easy Cron. My site is SiteGround. There AI responded to my cron with the following. Do you agree with there assessment? Do you see anything wrong with the following cron? /usr/local/php80/bin/php -d memory_limit=-1 -d max_execution_time=0 /home/customer/www/home2000.com/public_html/applications/core/interface/task/task.php 29eb6f039e43b68b4ae33156cb778ac2 Do you see anything wrong with the following cron? /usr/local/php80/bin/php -d memory_limit=-1 -d max_execution_time=0 /home/customer/www/home2000.com/public_html/applications/core/interface/task/task.php 29eb6f039e43b68b4ae33156cb778ac2 Here is there response: The cron command you've provided seems to be intended to execute a PHP script with certain parameters, but there are a couple of issues or points to clarify: 1. Script Path: The command includes placeholders (`/home/customer/www/home2000.com/public_html/applications/core/interface/task/task.php 29eb6f039e43b68b4ae33156cb778ac2`) which should be replaced with the actual path to the PHP script you want to execute. Ensure that these placeholders are replaced with the correct script paths or parameters. 2. PHP Version: The command specifies PHP 8.0 (`/usr/local/php80/bin/php`). Make sure that this version is compatible with the script you are running and is supported on your hosting environment. 3. Memory and Execution Time: You've set `memory_limit=-1` and `max_execution_time=0`, which means there are no limits on memory usage and execution time. While this can be useful in some scenarios, it's also risky as it could potentially lead to resource abuse if the script has any issues. Consider setting sensible limits based on your script's requirements and server capacity. 4. Cron Setup: Ensure that this cron command is properly set up in your Site Tools under Devs > Cron Jobs. You should also provide a valid email address when setting up the cron job to receive the output for debugging purposes, which can help you verify if the cron job is executing as expected. If you need to adjust or verify this cron job, you can do so by accessing the Cron Jobs section in your Site Tools. If you're unsure about the script path or any parameters, it might be helpful to consult with the developer of the script or reach out to us through the "Contact Us" tab on your current page for further assistance. Thanks for your help. Bob
Jim M Posted July 22 Posted July 22 The command we provide is correct to what is in your PHP configuration. We would not recommend changing the parameters provided to it in regards to memory_limit and max_execution_time. As mentioned by Marc, you encountered a 500 Internal Server Error when CRON ran. We would need the error log to further diagnose
Bob Snow Posted July 23 Author Posted July 23 Thank you, Jim, for your help, but I'm clueless. 1. How many log-on to my site, version 4.7, would I need to eliminate the need for the cron? 2. Will the New version 5 require the con for my issues? Bob
Randy Calvert Posted July 23 Posted July 23 (edited) 2 hours ago, Bob Snow said: Thank you, Jim, for your help, but I'm clueless. 1. How many log-on to my site, version 4.7, would I need to eliminate the need for the cron? 2. Will the New version 5 require the con for my issues? Bob It's not how many logons would eliminate the cron, but instead do you have traffic happening basically 24/7. For example, if you have no users from midnight to 5 am, none of the tasks that run in that time would run without cron or something else to execute those tasks. In addition, even if you were able to run it with traffic... if it's a 500 error, it would still fail to run. Again, you need to look at the server logs to figure out why the task triggers a 500 error. That will happen regardless if it's triggered via cron or running with traffic. And v5 will be like v4 in terms running background activities. Cron is highly recommended as it's the most reliable method in case you don't have traffic during certain times. If you don't know how to get or understand your server logs, you might want to use a third party resource to help. https://invisioncommunity.com/third-party/providers-directory/ Edited July 23 by Randy Calvert Jim M 1
Marc Posted July 24 Posted July 24 14 hours ago, Randy Calvert said: In addition, even if you were able to run it with traffic... if it's a 500 error, it would still fail to run. Again, you need to look at the server logs to figure out why the task triggers a 500 error. That will happen regardless if it's triggered via cron or running with traffic ^ this is the most important point here. Unless you resolve this, you have a problem regardless of how you run it. If you are unsure on how to obtain your servers error logs, you need to contact your hosting company for assistance
Recommended Posts