ChurchCRM / CRM

ChurchCRM is an OpenSource Church CRM & Management Software.
https://ChurchCRM.io
MIT License
636 stars 445 forks source link

Create PHP CLI Tool #5231

Closed crossan007 closed 9 months ago

crossan007 commented 4 years ago

Create a PHP CLI application to provide an "easy" mechanism for various maintenance tasks:

This concept is implemented extremely well by the OwnCloud development team, and I think ChurchCRM could benefit from a similar implementation.

crossan007 commented 4 years ago

@MrClever I'd like to see your thoughts for this - are there any tasks I'm missing?

MrClever commented 4 years ago

I can see this being a valuable tool for system admins, as you allude to. Some functionality I can also see being useful:

MrClever commented 4 years ago

While I'm pondering this, would it be worthwhile allowing admins to configure how background jobs are triggered? For example, in the configuration have a setting to toggle the background tasks "in-browser" or "via cron" etc? The reason I'm pondering it is in part a result of the "API error" tickets we get regularly which seem to be a result of spikes in long-running DB connections in the browser. Running from a cron job might mitigate this and allow tighter control over how many DB connections are used. A scripted background cron job could just chug away in the background slowly sipping from a single DB connection and still get the job done, as opposed to the need to quickly execute "in-browser" to avoid artificial lag etc.

crossan007 commented 4 years ago

Great expansion on what I meant by the final bullet point in my original issue text: Kicking off Timer Jobs

The cron job approach is also more conducive to supporting things like "sending scheduled emails / notifications" (doesn't exist now, but it conceivably could)

MrClever commented 4 years ago

Email notifications would be really handy from both a user and admin perspective. Case in point; it would be helpful for admins and/or users to be notified if their account was locked due to too many password attempts (cough for example cough). Also notifications for various success/failure situations would be handy too.

crossan007 commented 4 years ago

I was referencing calendar or otherwise "scheduled" notifications.

Event-driven items like failed logins are already feasible given the architecture.

dleigh commented 4 years ago

just chug away in the background slowly sipping from a single DB connection

Oh yes!

I also like the idea of either having the single cron chugging at the frequency I want handling only thing things I want done (we don't use MailChimp at the moment, for instance)

OR

Allowing multiple cron jobs that run at different frequencies to handle differing tasks that don't require the same frequency.

Whether this is with a CLI (wp cli in WordPress also comes to mind) or simply via a URL query string api is something for you all to work out, as to which is better. I suppose if someone didn't have cron on their hosting but could fire off URL requests from their own "back office windows machine" using scheduled tasks, the URL method might be more flexible for them.

At any rate I appreciate the effort you all are making to improve this!

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 9 months ago

This issue was closed because it has been stalled for 15 days with no activity.