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.


CRON scheduling

Login / Search

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

Well-settled

First, I had to modify the 1st line of the PHP in cron bridge to match my host's requirement (#!/usr/local/bin/php4.cli). The script appeared to run as expected once I made this change. I hope this doesn't violate any licensing or will not adversly affect my site. Let me know, and I'll remove it right away.

My host allows CRON scheduling. Unfortunatly, I'm allowed only one script once per day. Though, I am able to run it manually from my Host's control panel as often as I'd like.
Is there some other creative work-around for this to run at least twice a day?
If not, which I suspect is the case, what I plan on doing is having my members know that event notifications need at least a 24 hour window in order to get notified. Is there a minimum hours setting mayhap?
Back to the top
 
Posted
Rating:
#21623
Avatar

I hope this doesn't violate any licensing or will not adversly affect my site.

It's certainly not a licensing problem. You can edit all the code with a very small number of exceptions, relating to branding and tracking of unregistered sites.

The cron script has no restrictions on how often it must be run. It'll just do what you'd expect - cause delayed actions. If you want a creative workaround - perhaps modify the code to include the cron script on every page request (hence page views stimulate pretend cron checks).


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:
#21628
Avatar

Well-settled

Modified pages to simulate cron sounds great, but would this technique mistakenly cause multiple notifications for the same event?
Back to the top
 
Posted
Rating:
#21631
Avatar

It shouldn't do. ;) The cron system will remove jobs from its queue once they're finished, so the next time the cron is run (e.g. when a page is next loaded) a different job will be done.

Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: