Cron Job isn't Running

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.5
Webmin version 2.001

Cron job is not running even after it says no output generated

I am unable to run the cron job through webmin but if I go to my website and run it manually it runs but webmin wont run it I am using Blesta and put the right cron command but it doesn’t work


But when I look at Blesta it dosent run


I recently ran the cron manually by pressing that yellow button and this is the output that generates

Attempting to run all tasks for KiittenSMP Servers.
Attempting to apply credits to open invoices.
Attempting to apply credits for client group General.
Completed applying credits for client group General.
Attempting to apply credits for client group Server Cancelation.
Completed applying credits for client group Server Cancelation.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to auto debit open invoices.
The auto debit invoices task has completed.
Attempting to deliver invoices scheduled for delivery.
No invoices are scheduled to be delivered.
The deliver invoices task has completed.
Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to process service suspensions.
The service suspension task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to cancel scheduled services.
The cancel scheduled services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
The process renewing services task has completed.
Attempting to send payment reminders.
The payment reminders task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for support_manager delete_tickets.
Finished plugin cron for support_manager delete_tickets.
Attempting plugin cron for support_manager send_reminders.
Finished plugin cron for support_manager send_reminders.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
Attempting plugin cron for order process_abandoned_orders.
Finished plugin cron for order process_abandoned_orders.
All tasks have been completed.
Attempting to run all system tasks.
All system tasks have been completed.

But with the webmin cron it doesn’t run still

well there should be no output as you run /dev/null 2>1 at the end

2 Likes

I honestly don’t know I have been messing with this for 3 days and couldn’t find anything to fix it

have you set times for the cron to run. Maybe screenshot of the Edit Cron Job.

You’re editing system crons. It is not “Webmin cron”. There is a module in Webmin for editing cron jobs, which is what you’re looking at, but it is not a cron specific to Webmin.

I’m not trying to be pedantic (though I see it might sound like that), I’m just trying to make sure you understand that troubleshooting a cronjob you setup in Webmin is the same as troubleshooting a cronjob you setup using crontab -e or a text editor or any other tool that can edit cronjobs.

I would start by removing the redirection to /dev/null so you get some output! (As already suggested by stefan1959.)

Now I get this error

Could not open input file: /home/kiittensmp/public_html/blesta/index.php

Does it exist?

Is it executable?

The first line of an executable PHP file should be

#!/usr/bin/php

(or wherever the path to PHP is in Ubuntu).

You also need to make the file executable:

chmod +x /home/kiittensmp/public_html/blesta/index.php

By the way… Are you sure you want an executable PHP file in the public Web directory? There are plenty of reasons why you might; but absent such a reason, it’s probably better off in /home/{user} (above the Web root in the hierarchy).

Richard

1 Like

whats docs are you going off to run the cron?

none I honestly dont know much about php

and this is still giving me the same output

and when I run it as root or KiittenSMP or support@kiittensmp.com instead I get this

Output from command /usr/bin/php -q /home/kiittensmp/public_html/blesta/index.php cron …
Script error: the ionCube Loader for PHP needs to be installed.

The ionCube Loader is the industry standard PHP extension for running protected PHP code,
and can usually be added easily to a PHP installation.

For Loaders please visit:

For an instructional video please see:

ioncu.be/LV

and KiittenSMP is the virtual servers name on webmin

Nevermind I fixed it I Literally just had to follow this guide How to install ionCube Loader - Wetopi but all i had to do was do part 3 Load the ionCube extension and run on of these

for php-fpm:

echo ‘zend_extension=ioncube_loader_lin_7.4.so’ > /etc/php/7.4/fpm/conf.d/00-ioncube-loader.ini

for php-cli:

echo ‘zend_extension=ioncube_loader_lin_7.4.so’ > /etc/php/7.4/cli/conf.d/00-ioncube-loader.ini
but did both just in case

You should never do that. Wildly dangerous to run domain owner controlled code as root. Even if you trust that user, it’s still wildly dangerous because any exploit of the application becomes a potential root level exploit of your system. Never do that.

And, also, if all the deps are installed by a user into a user application directory and that directory is added to the user’s path or a otherwise made available to the user, root won’t have the same setup.

Just don’t do this.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.