Cron jobs not running

Hello,

For the past few days, I have been trying to get WPALLImport cron jobs to run via Cyberpanel cron job manager.

System:
Hosting: Hostinger VPS | 4 vCPU |
4 GB RAM | 80GB SSD
OS: Ubuntu 18.04.4 LTS
Cyberpanel: v 2.0
Php: 7.3
Redis installed: Yes
Memcache installed: Yes
CSF: Enabled

Example cron which I added to Cyberpanel cron manager:

wget -q -O - http://example.co.uk/wp-load.php?import_key=examplekey&import_id=335&action=trigger >/dev/null 2>&1

I have a sneaky suspicion it is not running due to special characters such as β€œ&” but I really have no idea!

In CSF live sytem log I noticed

Suspicious Process PID:30010 PPID:28935 User:furxxxx Uptime:89 secs EXE:/usr/local/lsws/lsphp74/bin/lsphp CMD:wget -q -O - http://example.co.uk/wp-load.php?import_key=examplekey&import_id=335&action=trigger >/dev/null 2>&1

So I added the following line to csf.pignore which seems to have stopped the alert displaying in the CSF system live log

cmd:wget -q -O - http://example.co.uk/wp-load.php?import_key=examplekey&import_id=335&action=trigger >/dev/null 2>&1

Can anyone shed some light on why the cron is not working please and any steps to resolve.

I am new to VPS however I have already searched the forum, found many cron related posts however nothing seems to be working for me.

Thank you :slight_smile:

Thank you for that,

Followed your advice, I finally managed to get the cron to run with php command /php-cgi

Thank you :slight_smile:

could you elaborate on that please?

Hey How did you fixed that? Can you write it here please?

For example.

/usr/local/lsws/lsphp74/bin/php-cgi /home/MYDOMAIN.CO.UK/public_html/wp-cron.php?doing_wp_cron

or

wget -q -O /dev/null β€œhttps://www.MYDOMAIN.CO.UK/wp-cron.php?doing_wp_cron”

I fixed the issue in a better way.
if this happens to you probably two things causing the error. the β€˜&’ symbol or SSL error that prevents the trigger.

What I did was I redirected yourdomainadress/trigger/ and yourdomainadress/processing/ to cron links.
I used Redirection plugin but you can do this with any other plugin or via htaccess

and lastly below commands need to be added in cyberpanel;

wget --spider β€œhttp://yourdomain.com/trigger/” --no-check-certificate

wget --spider β€œhttp://yourdomain.com/processing/” --no-check-certificate

now it should work like a charm.

2 Likes

No need to add >/dev/null 2>&1 ?