Author Topic: Cronjob for WPallimport  (Read 3023 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Cronjob for WPallimport
« on: August 09, 2022, 07:30:11 AM »
Hi everyone, i try to create a cron job for wpallimport with no luck.
What i have tried so far,

Code: [Select]
/usr/local/bin/php /home/usernaname/public_html//wp-load.php?import_key=MYKEY&import_id=1&action=trigger
Code: [Select]
curl "https://MYWEBSITE.com/wp-load.php?import_key=MYKEY&import_id=1&action=trigger"
Code: [Select]
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.

Offline
*
Re: Cronjob for WPallimport
« Reply #1 on: August 09, 2022, 09:48:37 AM »
I use curl and it works. Connect via ssh and type in the console, or show the cron logs.

Offline
*
Re: Cronjob for WPallimport
« Reply #2 on: August 09, 2022, 11:15:42 AM »
I tried from console and so far the only thing that worked is
Code: [Select]
/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php import_key=MYKEY import_id=1 action=trigger
Code: [Select]
/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

Code: [Select]
/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php?import_key=MYKEY&import_id=1&action=trigger
Code: [Select]
/usr/local/bin/php-cgi /home/USERNAME/public_html/wp-load.php?import_key=MYKEY&import_id=1&action=processingThey 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
Code: [Select]
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

Code: [Select]
Aug  9 10:35:01 srv CROND[1140995]: (root) CMD (/usr/local/maldetect/maldet --mkpubpaths >> /dev/null 2>&1)
Code: [Select]
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 .

Offline
*
Re: Cronjob for WPallimport
« Reply #3 on: August 15, 2022, 07:52:31 PM »
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.....