Website URL
(please specify the URL of the site on which you are experiencing the problem)
Error Message
No response body was captured for this cron job execution.
Could not resolve host: www.epto-project.rf.gd
Other Information
I have this PHP file:
<?php
error_reporting(E_ALL);
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
header('Content-Type: application/json;charset=utf-8');
require "../connection.php";
$query = "
UPDATE events
SET `status` = 0
WHERE `status` IN (1, 2)
AND `data` > CURDATE();
UPDATE events
SET `status` = 1
WHERE `status` IN (0, 2)
AND `data` = CURDATE();
UPDATE events
SET `status` = 2
WHERE `status` IN (0, 1)
AND `data` < CURDATE();
";
if (mysqli_multi_query($conn, $query)) {
echo json_encode(TRUE);
} else {
echo json_encode("Error: " . mysqli_error($conn));
}
mysqli_close($conn);
?>
and im getting the response from the cronjob part:
No response body was captured for this cron job execution.
Could not resolve host: www.epto-project.rf.gd
I’m not getting any response, its suposed to get 200 or other response.
KangJL
June 29, 2023, 3:14am
2
I believe cron on free hosting does not work this way.
Read below
Last weekend, we released a new feature for everyone: cron jobs from InfinityFree!
This cron job system is similar to the cron jobs system available in the control panel. However, these new cron jobs are easier to configure, have a more predictable schedule, have more generous time limits (and won’t disappear if you exceed them), and have a log where you can view the result of recent executions.
For an example on how to use this feature, please see this guide on how to use it to handle WordPre…
The control panel offers a tool called Cron Jobs to periodically call a specified URL on your site. This is useful to execute scheduled tasks or perform background operations.
The control panel offers a “Minute and/or Hours” selector to choose when the cron job is executed. However, this configuration system is confusing and tends to behave in unexpected ways.
Recommended Schedules
Calling a URL once per hour
If you want like to execute a URL once per hour on the whole hour, the schedule to do…
4 Likes
Admin
June 29, 2023, 12:54pm
3
Parzival6g:
and im getting the response from the cronjob part:
No response body was captured for this cron job execution.
Could not resolve host: www.epto-project.rf.gd
I’m not getting any response, its suposed to get 200 or other response.
The error “Could not resolve host” means that the cron job server could not resolve the DNS of your subdomain. If the server cannot obtain an IP address for your account, it means it cannot start the HTTP request. And if there is no HTTP request, there is no HTTP response, so there is no response body or status code either.
So the data being displayed seems correct, but the fact that half of the cron jobs fail because of a DNS error is not OK. I’ll dive into it and see if I can find what’s causing it.
KangJL:
Read below
Please ignore those articles. You seem to have set it up correctly, so the announcement of the feature is irrelevant. And the second article is about the control panel cron jobs, not the client area cron jobs, and scheduling isn’t the issue in the first place.
5 Likes
system
Closed
July 6, 2023, 12:55pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.