Processing queue by secret key do not work anymore?

Hi there!
We were using this cron job:
wget -q -O /dev/null http://www.domain.com/newsletter/admin/index.php?action=processqueue&secret=########### 1>/dev/null 2>/dev/null

And it was working great… until we started to see that it was not working anymore
In fact, if I go to http://www.domain.com/newsletter/admin/index.php?action=processqueue&secret=########### I just see a login page… is that the regular behavior??
Should I see some information about news being sent, etc instead that?

And then, I tried to login first… and after that go to the above URL,
And it showed something like the phplist admin menu? and at the end:

{“campaign”:0,“num_users_for_message”:0,“batch_count”:0,“batch_total”:0,“sendemail
returned false total”:0,“send blocked by domain throttle”:0,“add
attachment error”:0,“sendemail returned
false”:0,“sentastest”:0,“invalid”:0,“failed_sent”:0,“sent”:0,“num_per_batch”:-1,“delaysend”:599}

Is that ok? it looks like its showing some array sending stats (in this case saying it is in delay mode, waiting for a new output serie)

And that seems to work (I can see the amount of sent news increasing…)
So… why is that? to use the secret key url way do I have to always login first?? I thought that should work ok as anonymous, or not?

No idea what to do, or check… or what… D-:

UPDATE: my bad, it is not working… as the queue, for some known reason?, needs my login first… It is not working when it is launched by the cronjob, as that “browsing” is anonymous…
D-:

PD: what happend with the old forum? was deleted?

@luuuciano The URL that you are using is not correct. See https://resources.phplist.com/system/remote_processing for an explanation.

1 Like

wohoooooooo!
Thanks a lot @duncanc, changed it to
http://www.domain.com/newsletter/admin/?page=processqueue&secret=##########
And it is working again :smiley:

\o/

Glad you got it sorted @luuuciano

a
x

Oh, BTW (maybe it helps others), I had to use this as cron job:

wget -q -O /dev/null http://www.domain.com/newsletter/admin/?page=processqueue"&secret=###############" 1>/dev/null 2>/dev/null

With those " " added… without those it did not work… no idea if there is a better/proper way to do it…

1 Like

You are doing it right. I have found that when you run a command on command line (i.e. a cronjob), some characters are misinterpreted by php (in your case, the ‘?’ charachter)

You need to tell php that this is a string, so you add the " " or the ’ ’ to do that.

To be a little more clear as to what the string is, I usually put the " around the whole string… such as:

wget -q -O /dev/null “http://www.domain.com/newsletter/admin/?page=processqueue&secret=###############” 1>/dev/null 2>/dev/null

1 Like