CRON task on protected site

Status
Not open for further replies.

jfquestiaux

Well-Known Member
Hi,

I need to trigger the Fabrik cron plugin on a site protected by a htaccess file.

Is there a way to "sneak in", maybe calling the cron directly to a PHP CLI call to a file through the server that hosts the site?
 
Are you triggering it with a cron job, firing a wget?

If so, you should just be able to provide the username and password in the wget call ...

Code:
wget --user=foo --password=bar123 http://your.site/whatever?fabrik_cron=yoursecret

If you have special characters in the password, you may have to % encode them, like %21 for !

-- hugh
 
Hi,
I reopen this post because I still have issues with this cron task (email plugin).

I have a prefiltered list and a PHP condition returning either true or false and if the condition is met, an email is sent and an element gets updated to the date sent via:

$now = new DateTime();
return $now->format('Y-m-d H:i:s');

Manually, everything works fine, even though I have this error in the log file (AFTER the message "mail sent"):

2,DateTime::__construct(): Failed to parse time string (NOW()) at position 3 ((): Unexpected character,/home/xxx/public_html/libraries/fabrik/fabrik/Helpers/Worker.php,2018

and also the time of last run is not updated


If I try triggering the task via ?fabrik_cron=1, I get just the error above and nothing else.


Is it a bug or something I set up wrongly?
 
Well somehow it seems that it resolves itself. Still reports some errors but the cron is triggered. Let's leave it be.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top