Cronjob for WPallimport

Started by Alexk92, August 09, 2022, 07:30:11 AM

Previous topic - Next topic

Alexk92

Hi everyone, i try to create a cron job for wpallimport with no luck.
What i have tried so far,

/usr/local/bin/php /home/usernaname/public_html//wp-load.php?import_key=MYKEY&import_id=1&action=trigger

curl "https://MYWEBSITE.com/wp-load.php?import_key=MYKEY&import_id=1&action=trigger"

wget -q -O - "https://MYWEBSITE.com/wp-load.php?import_key=MYKEY&import_id=1&action=trigger"


But none of those worked (same methods had been applied for action=processing). Am i missing something, because all this have worked with cPanel, plesk.

tomkolp

I use curl and it works. Connect via ssh and type in the console, or show the cron logs.

Alexk92

I tried from console and so far the only thing that worked is
/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php import_key=MYKEY import_id=1 action=trigger
/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php import_key=MYKEY import_id=1 action=processing

Even though that i tried to copy those inputs in Crontab as

/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php?import_key=MYKEY&import_id=1&action=trigger
/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php?import_key=MYKEY&import_id=1&action=processing
They did not worked that way.

To be honest i would really prefer to use cURL but when i insert the path for curl interpreter i get the error
usr/local/curls/bin/curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory.

And from the logs the only thing that i noticed except the cron commands was this lines

Aug  9 10:35:01 srv CROND[1140995]: (root) CMD (/usr/local/maldetect/maldet --mkpubpaths >> /dev/null 2>&1)
Aug  9 10:35:01 srv CROND[1140994]: (root) CMD (/usr/local/cwp/php/bin/php -d disable_functions="" /usr/local/softaculous/do_backups.php >> /dev/null 2>&1)

they both appear right after every action=processing .

Alexk92

So,
curl seems to work when executed from root panel but not when triggered from user panel.
And on error logs nothing pops up just to give me a hint on why this is happening.
On cron logs the commands are shown as expected and nothing more.....