Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

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

Open
mreidsma opened this issue Jul 2, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@mreidsma
Copy link
Member

mreidsma commented Jul 2, 2015

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 mreidsma added the bug label Jul 2, 2015
@mreidsma
Copy link
Member Author

mreidsma commented Dec 3, 2015

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 mreidsma self-assigned this Dec 3, 2015
@mreidsma mreidsma changed the title Email cron job doesn't send an email to the last person Status App: Email cron job doesn't send an email to the last person Dec 3, 2015
@mreidsma mreidsma changed the title Status App: Email cron job doesn't send an email to the last person Status App: [BUG] Email cron job doesn't send an email to the last person Dec 3, 2015
@mreidsma
Copy link
Member Author

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
Copy link
Member Author

I've updated the code in f64c8eb 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
Copy link
Contributor

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

@mreidsma mreidsma added this to the Version 2.2 milestone Jan 22, 2016
@mreidsma
Copy link
Member Author

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants