HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED] - 9.0.4 - CRON - help needed

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#93846 (In Topic #18738)
Avatar

Community saint

Doing some Admin housekeeping. Saw this …


My predicament:
  • know absolutely nothing about CRON
  • it appears that CRON is set up to run every 15mins, every day, every week … etc
  • checked these forums for past queries about CRON problems, and although there is some 'solid' information in here, there are also 162 results for the search item *cron*
  • using one of the suggestions [yourbaseurl/data/cron_bridge.php?querymode=1] I got [/usr/bin/php -C -q -no-header /path/to/mysite/data/cron_bridge.php] as expected
  • I've changed the CRON parameters through my cPanel to read [php /path/to/mysite/data/cron_bridge.php] as recommended. Have to wait to see if anything materialises, but I suspect I am going to get the same error as the following when I call up cron_bridge.php manually:
Critical error - bailing out

This is an error that has been elevated to critical error status because it occurred during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occurred before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.
PHP WARNING [2] Invalid argument supplied for foreach() in sources/mail.php on line 258 (version: 9.0.4, PHP version: 5.2.17, URL: /anglo/data/cron_bridge.php)
The line referred to specifically, if I am reading the error report correctly, is:



And here is the Stack trace …

Expand: Stack trace Stack trace


Any shards of sunlight for this old geezer …?

 :lol:


Last edit: by Fletch

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#93848
Avatar

Community saint

Hi Fletch,

In cPanel Cron Job  interface, you should see the following after setting a 15 minutes Job:

*/15 * * * * php-cli -C -q --no-header /home/yourcpanelname/public_html/yourwebsitefolderifany/data/cron_bridge.php

This has worked for me without problems for years. I have it on for every 5 minutes.

Hope this helps.

Jean
Back to the top
 
Posted
Rating:
#93850
Avatar

I'm a bit anxious what those emails might be. My suspicion is some kind of bug has caused them to grow up exponentially - the CRON system trying to send an email, but failing, generating an error email, that failed, …. But I'd want to check.

Do you want me to take a look?
Happy to do so via a free bug report ticket, would need FTP access.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#93852
Avatar

Community saint

Chris Graham said

Do you want me to take a look? Happy to do so via a free bug report ticket, would need FTP access.
I can soon raise a ticket, but I think you are 'persona-grata' on my site, and already registered as either an Admin or Super-Mod.

Do let me know if that is not so …!!

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#93853
Avatar

Yes, I think actually I probably have the access I need. As I have your tacit permission now, I'll take a look probably tomorrow.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#93854
Avatar

Community saint

Chris Graham said

… your tacit permission now, I'll take a look probably tomorrow.

thanks

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Item has a rating of 5 (Liked by Jean)  
Rating:
#93855
Avatar

Community saint

Jean said

… a 15 minutes Job:

*/15 * * * * php-cli -C -q –no-header /home/yourcpanelname/public_html/yourwebsitefolderifany/data
/cron_bridge.php

This has worked for me without problems for years.
Thanks, Jean, and it has worked for me also. The code you've cited is exactly what appears on my cPanel cron-job page.

I think there is a bit of a screw-up with the 'mail' element, and I expect Chris will home on it without hesitation - and probably find I have an OVERRIDE somewhere that is causing the hassle!

Overrides and me don't seem to have an harmonious relationship …!!

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#93867
Avatar

The mail queue really was sticking on real mails, for quite a while. I have fixed the sticking point.

I have let the queue sent out, but I removed first some spam that a spammer had put in. So people will have received some late mail but the quantity isn't huge.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#93869
Avatar

Community saint

Chris Graham said

… was sticking on real mails … I have fixed the sticking point …
Thanks.



Your assistance was obviously invaluable, but I'm no wiser as to whether I contributed to this issue.

And if I did, what do I need to avoid doing in the future to stop something similar recurring?



Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#93870
Avatar

I believe an old (since fixed) bug caused dodgy data in the mail queue. I worked around it so that situation can't cause the problem again.

So it was me not you ;).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Jean)  
Rating:
#93871
Avatar

Community saint

Chris Graham said

I believe an old (since fixed) bug caused dodgy data in the mail queue. I worked around it so that situation can't cause the problem again.

So it was me not you ;).
I shall take time out to print this, frame it, and point it out to the dog every time he sasses me.

Thanks for putting my mind at rest!

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: