gvsulib / library-Status

A quick and easy status monitor for all of our library systems.
http://labs.library.gvsu.edu/status
GNU General Public License v3.0
12 stars 4 forks source link

Status App: [BUG] Email cron job doesn't send an email to the last person #33

Open mreidsma opened 9 years ago

mreidsma commented 9 years ago

This is the way Jon wrote the code. In the short term, I added a dummy account and a dummy system. The dummy system isn't displayed on the site (system_category = 1), and there is one open ticket for the dummy system assigned to the dummy account. The dummy account has an email address that starts with zzz, so that it is always the last once.

When I get a chance I'll rewrite the code to email all addresses.

mreidsma commented 8 years ago

Might just pull this feature out since our email system doesn't allow emails from our server to get through. Works fine to gmail accounts, but not to gvsu.edu.

mreidsma commented 8 years ago

I did manage to route the emails to Asana, which works for alerting folks that there are open issues. However, the fact that the cron job doesn't fire is a problem. I suspect it's because @jonbloom is checking for CLI before running the function, hence why it works fine if executed manually from the command line. However, the cron job fails to execute at all.

This Stack Exchange Article explains how to make the PHP script run from a cron job: http://stackoverflow.com/questions/22864353/cron-job-php-script-fails-but-script-will-run-via-cli-or-through-browser

mreidsma commented 8 years ago

I've updated the code in f64c8eb955b8d055d60e91582f8678de239214fa to have the hashbang, whill hopefully will work with the cron job. I didn't want to tinker too much with the cron, and it's set to run tomorrow (Saturday) night, so I'll check in Monday to see if it worked.

jonbloom commented 8 years ago

Sad to see that my code has been giving you a bunch of problems after I left. Sorry friend.

mreidsma commented 8 years ago

These things pop up! I'm just finally getting to them. Had you stayed, you would have been fixing them. :) I didn't know about the CLI/cronjob issues, and thought I'd tag you to pass it along. One of those things you don't run into all that often.

Hope you're well!