-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cron #316
Comments
This repository has info about the access controller Dallas Makerspace is using: https://github.com/pawl/Chinese-RFID-Access-Control-Library/ This is the web service we're using to deactivate/activate badges: https://github.com/pawl/Chinese-RFID-Access-Control-Library/blob/master/examples/webserver.py We use a billing system called WHMCS which has a hook for when people get deactivated by the daily cronjob. That hook triggers a request to the webservice above. I would like to implement the same hook system in seltzer to help other hackerspaces automate their access control systems. |
I've been looking more closely at Seltzer. It looks like this request would also involve implementing a Status field (Active/Inactive/Overdue) in the Members section. The cronjob would run each morning and update the Status field based on the member's payments. This allows you to do things like automatically send e-mails when a person is considered "overdue". The cronjob would need settings like how many days until the member is considered overdue or inactive. |
You can achieve this by using the functionality in the member and payment If you call payment_accounts(["cid" => 1]) it will return an array of this Which corresponds to a balance owed of $42.37. If it's greater than 0, you -Ed On Mon, Apr 21, 2014 at 12:17 PM, Paul Brown notifications@github.comwrote:
Edward L. Platt |
The purpose of the status field would be to prevent the cronjob from doing the same thing over and over. Once the user goes Overdue, that's the only time we ever trigger the overdue e-mail. Once they go Inactive, that's the only time we trigger the badge deactivation. |
Are you concerned about the performance of running payment_balance() for On Mon, Apr 21, 2014 at 12:30 PM, Paul Brown notifications@github.comwrote:
Edward L. Platt |
Getting the payment balance only shows you whether they are overdue at that time. It doesn't show what actions were taken in the past. So, it looks like the current functionality will send emails to everyone with a positive balance when you press "Send Billing Emails". If this was automated, it needs to know not to spam the same people every day. The cronjob would know it already sent an e-mail to that person because their status is now "Overdue". Just running the calculations everyday without changing the status would be a problem if the server goes down. It needs to know it still needs to process everything it missed while the server was down. All the cronjob would need to do is find things which need their status changed, and do the processing like normal. |
I see, you're accounting for the case where every member's billing cycle Currently the billing module assumes billing cycles begin on the 1st. So I'd love to see the billing module extended to allow arbitrary billing -Ed On Mon, Apr 21, 2014 at 1:09 PM, Paul Brown notifications@github.comwrote:
Edward L. Platt |
I would also like to add a few web service REST endpoints to Seltzer. Any good places to stick those in already? I was imagining something like http://yourserver.com/crm/GetKeyWhiteList.php?allinfo=true&f=JSON that would be called from the door lock computer each day at 1 am or something to update its local whitelist. |
Yes! REST endpoints are something I've been thinking a lot about. I'm On Fri, Feb 6, 2015 at 11:32 AM, Josh P notifications@github.com wrote:
Edward L. Platt This electronic mail message was sent from my desktop personal computer. |
Should we create a new thread in the issues tracker for REST endpoints / On Fri, Feb 6, 2015 at 1:09 PM, Edward L Platt notifications@github.com
|
Sure. I think a broader discussion needs to happen first, but it doesn't On Fri, Feb 6, 2015 at 1:37 PM, Josh P notifications@github.com wrote:
Edward L. Platt This electronic mail message was sent from my desktop personal computer. |
Paul B from Dallas Makerspace says:
Drupal's approach would probably work quite well. We add a cron.php file that loads the core and runs hook_cron() for every module. Then all the user has to do is add "wget http://localhost/cron.php" to their crontab.
Approval? Objections?
The text was updated successfully, but these errors were encountered: