Thanks for the reply, Eric. I think I figured out a solution, albeit my question was a bit confusing. I have an e-commerce website that integrates with a payment gateway in order to manage paid subscriptions for users. Sometimes these subscription payments fail - either from expired cards or insufficient funds. I wanted to create a schedule task that runs nightly that will check the subscription statuses of each user on the payment gateway, if a user's subscription is no longer valid due to a payment failure I want to notify that user with an email.
The main problem I ran into is that I wanted to configure the pyramid_mailer only once in the applications main() function and use that instance for both the scheduled subscription status job as well as throughout the application (ie. sending a forgotten email password).
In the end, I just pass the pyramid_mailer instance that I created in the applications main() function to a Notifier class that handles the scheduled job. I'm pretty sure I don't have to worry about any race conditions or issues with thread locals since the pyramid_mailer instance is thread safe.
...a bit confusing, but thanks for your help!
-Vincent