Cron job not working (I need PHP CLI)

Hi,
I’ve recently opened an account with 000webhost and setup a self hosted rss feed reader.
I’ve also setup a cron job to automatically download/update the feeds but it seems it is not working even if (I think) I’ve configured it correctly (I’ve used a similar command with another web hosting provider).

How can I check if I have correctly setup the cron job?
Is it maybe the service not working?

I’ve also tried https://cron-job.org/en/ but this service cannot be used in my case because I get the following error:

#!/usr/bin/env php
error: getopt() failed. Most probably you are using PHP CGI to run this script instead of required PHP CLI.

To avoid this and try running a PHP CLI command I’ve written a further php script to be called via cron-job.org with the following code:

<? php
echo shell_exec("/usr/local/bin/php /path/to/php/script/to/be/executed.php");
?>

Obviously /path/to/php/script/to/be/executed.php is the path to the php script I need to execute in a final instance to update the rss feeds.

Even in this case it seems I cannot execute it because shell_exec is not supported. I have tried to execute echo shell_exec("which php") to be sure about the path of the php bin executable but the command has been rejected because of security reasons.

How can I solve this issue and be able to execute the update php script?

Thanks

Hello. What is your website address and the script you’re trying to execute? shell_exec is disabled on free plans.

error: getopt() failed. Most probably you are using PHP CGI to run this script instead of required PHP CLI.

We don’t support CLI cronjobs on free plans.