Juergen Posted October 2, 2014 Share Posted October 2, 2014 Hello at all, I am not a skilled PHP-expert so the question will be easy for all the experts out there. I use a cron job and there will be the possibility to trigger it in various intervals (minutes, hours, days,...) Question: Does it makes a huge difference in case of the performance if I use an interval of every minute (server load) on a small site. At the moment I cannot feel a difference but the site is not public (maintainence mode). Which interval is recommended? Best regards Jürgen Link to comment Share on other sites More sharing options...
mr-fan Posted October 2, 2014 Share Posted October 2, 2014 It will depend what the cron job does, too! So how often the interval is really needed, or the script should run. And it depends on the server environment... So more infos should give you more detailed answers. Link to comment Share on other sites More sharing options...
Juergen Posted October 2, 2014 Author Share Posted October 2, 2014 The cron job triggers the event calendar at the moment, so it checks if the event is out of date and then it unpublish it (schedule module). I have also planned to trigger the newsletter subscriptions. I use Mailchimp for the newsletters. At the moment the list of subscribers/unsubscribers will be triggered via the newsletter form from the frontend. If there is a change (subscription or unsubscription) and the submit button will be pushed the list will be sent to Mailchimp to get the list always up to date. But this only works for the frontend at the moment. If I change a newsletter subscription in the backend it will not work at the moment because nothing triggers the sending of the changes to Mailchimp. Server ist Apache. Link to comment Share on other sites More sharing options...
mr-fan Posted October 2, 2014 Share Posted October 2, 2014 Ok just for the events usecase it is simple.....there should be no problem to make less intervalls since you have in the frontend output of the event a simple check. If you check the output of the event against the actual date there is no need to run the script to often since the site visitors don't see wrong content....and lets say once a day the script cleans older events out....some links: https://processwire.com/talk/topic/2448-show-date-published-on-a-page/#entry23246 https://processwire.com/talk/topic/24-publishunpublish-by-date-or-by-manual-means/#entry103 https://processwire.com/talk/topic/29-how-to-unpublish-a-page-without-deleting-it/ for the newsletter if no real experience for a good advice.... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now