For some weird reason, PMs are not sent to the Admins group on my dev install.
The job is running, so I don’t see why the PM wouldn’t be sent, even though its sending criteria is met?
AI-generated summary
In a development environment, NateDhaliwal encountered an issue where private messages (PMs) weren’t being sent to the Admins group despite the scheduled job running and meeting its criteria. pfaffman suggested adding debug output to inspect the PostCreator call, which NateDhaliwal tried but saw no output, prompting a review of conditional logic. merefield recommended disabling validation and clarified the job runs twice daily unless adjusted — NateDhaliwal confirmed it runs every 10 seconds in dev. merefield also noted messy indentation and possible misplaced end statements, illustrated with a screenshot. NateDhaliwal considered switching to flagging as an alternative. Moin raised the critical point that by default, no one may be allowed to message the Admins group — confirmed by a screenshot — and pfaffman advised testing the call in the Rails console or sending to a specific admin user. NateDhaliwal confirmed the issue was resolved after changing group messaging permissions but remains puzzled that the JSON request returned no data.
I would add a puts before the call to PostCreator and assign what it returns to a variable to you can print it after it’s called.
Yes… I did do that to see if the job runs, and another puts before that, but nothing was printed. I’ll need to revisit my if statment logic, I think.
Couple of things:
- Specify validation off as that might block creation
- Every 12 hours is twice a day in contrast to your comment in case you wanted it sent just once a day.
Oh sorry, I should have added: my dev env makes it run every 10 seconds.
Maybe I should have clarified - even when all checks passed, no pm would send. Perhaps I should try doing a flagging option instead?
Is anyone allowed to message your admin group? I think by default nobody is

Good one! Does that call work at the rails console? Also, try just sending it to the admin user.
Yes, I can now message the admins group after changing that setting. What puzzles me now, is that the json request doesn’t even seem to return anything
…
