Problem with CronJob

SYSTEM INFORMATION
OS type and version REQUIRED
Webmin version REQUIRED

I installed webmin on Ubuntu 20.4 but my CronJob does not work. Where can the problem come from?

It’s about 99.99% your cronjob. Whatever you’re trying to run doesn’t work. cron is not a thing that fails, as long as the crond service is enabled and running.

do you want me to send a picture to see where the problem comes from? the idea is because I put a cron command and it doesn’t process it. Is it possible that this is the problem?

I think the suggestion is that your Cron job is failing (possibly because it will not run) rather than the underlying process (Cron Daemon) - or to put it more bluntly very unlikely to be a Webmin problem.

Presumably you created the job through Webmin -> System -> Scheduled Cron Jobs then check there first by checking the entries have sensible values. That would also probably the most useful screen shot to show.

I attached image https://www.nutushopall.ro/CRON.rar

Please see the attached pictures including the command to see. If you can help me because cron is not working, is it possible that curl is not working?

I have problem
PHP Warning: Module “mcrypt” is already loaded in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/componente-fotovoltaice/public_html/admin/controller/module/universal_import.php:2003
Stack trace:

Sorry but the images will not display on my system (it is attempting to download and my security settings forbid that) can you not use the forum upload button Screenshot 2023-12-23 133653 to add them to a post?

Are you sure the Cron Daemon has not been stopped.

You need to workout why php is in error. You need to elaborate on the php code for instance is this wordpress

Looking again you need to install php curl to start with

Ah ! that is a separate problem.

PHP curl is not normally added. (at least on my VM) so you need to add it if not already done.

IT is a problem caused by some module in your web app that is asking for it in PHP.

Go to Virtualmin -> Web Configuration -> PHP Options then be sure you are using FPM execution mode. Then expand the PHP Information to reveal the modules loaded.
Is curl listed?

which is most likely to be 2 or more entries in the relevant php.ini file. The line being

extension=mcrypt.so

which again with an unknown PHP app, it may have added this in to the php.ini file or the OP may have done this himself.

It should be if you used the docs to install Multiple PHP versions

I have Ubuntu 22.04

Yep, its in the docs

but I didn’t which is why curl is not there - and I don’t care or need it - but the OP clearly does for the app that is trying to run. We have moved quite a way from the original declared “problem with a Cron Job”

Its related to issue I thought not having curl working correctly for cronjob.

if I install these modules in php, tell me because my cron command will definitely work?

You are clearly asking for PHP curl module available in PHP and it is not there so you need to install it. You have identified the problem as not being Cron or PHP you just need to install the `curl module that your app is requiring.

and please edit the title of the topic to show the fact it has nothing to do with Webmin or Cron.

Nobody can tell you that it will definitely work with that change. But, we can all see it is currently not working and that is at least one of the problems that makes it not work.

Also, is this user in a jail? There are many additional considerations when using chrooted users. In that case, you have to explicitly provide everything the user will need to do whatever you want the user to be able to do inside the jail. (I recommend not using jails unless you’re willing to take time to understand them.)