For my Azure app I have a variety of scenarios for needing both scheduled and triggers jobs. Having researched both Azure WebJobs and Scheduler it appears I can accomplish this, but not in the best way possible.
My use cases will go something like:
Weekly email blast (seems right up the alley for Scheduler)
Event invites, dynamically timed based on event's time (I could have
a job check every hour to see if any need to be sent? or at the
event's creation create a Scheduled Job at the specific time, but
what happens if the event changes?)
Reminders based on #2 above
(same issues/questions)
Welcome emails (two versions, one if they
complete a walkthrough and another if they don't: how to manage the
timing of this?)
So basically I see how I can use Azure Scheduler to accomplish all of this, but not in the most efficient way. I would like to see if there's a way to manage Azure Scheduler along with some sort of triggered Jobs based on various criteria, controller by code. Does something like this exist?
Update
To add a bit more information to this,
I'm using Mandrill as these are transactional emails. The things that makes my use case not appropriate for Mailchimp or some automation platform is I have repeat templates I will be sending out (5ish) which are triggered dynamically based on my user's events and various configurations.
Examples:
1) New user registers. If they complete an on-boarding walkthrough they receive one type of welcome email, if they don't complete the on-boarding walkthrough within x minutes they receive an other type of welcome email.
2) An event is created by an admin. At that moment code will comb through all users to see who should be invited based on user's preferences, then send out personalized invites to each user.
Consider using the WebJobs SDK for some of this. For example, you could use an Azure Storage Queue to invoke your web job as event invites are created or modified in your application. You may want to have different queues that different web jobs are triggered from too. For example, one for invites, another for reminders, and one for welcome emails.
The weekly email blast may be a separate scheduled web job in your scenario.
Putting my business cap on, it sounds like you have a need of something that will handle your email marketing/automation. Consider looking at 3rd party products that specialize in this, instead of hand-coding it. Mailchimp # http://mailchimp.com comes to mind. They have a feature called Goal completion more info at: http://blog.mailchimp.com/new-trigger-emails-from-website-traffic/
Alternatively, a monitoring and automation service that my company provides (CloudMonix # http://cloudmonix.com ) allows for automatically kicking off tasks based on some very custom criteria. CloudMonix knows nothing about email marketing, but it can kick-off a Web job or an Azure automation job if some SQL record appeared in the database or a metric published somewhere.
Related
I am working on integrating stripe subscriptions in a website. So, I am thinking about using the subscription.status to monitor payment. So, once the current period ends, I check the subscription. If active, great, I update the user data. If not, then I act accordingly based on the status.
However, it seems to be that webhooks are the correct way to do this. Why is that better than just checking the status? It seems pretty much the same to me.
Using webhooks will allow you to keep a track of a whole bunch of things rather than just the status of a subscription [1].
You can design a webhook endpoint to listen to various events such as;
Whenever a new subscription is created or an existing subscription is
canceled
In case you offer multiple plans for subscription, you will
be notified if a customer switches from one plan to another
Whenever an invoice is created, finalized, paid or in-case payment attempt fails
If you don't use webhooks, you will have to constantly poll for status changes until the status actually does change. That approach isn’t really scalable. So instead of having to keep looking for the information, with a webhook the information would come to you.
So instead of having to keep looking for the information, information itself would come to you. You can use the webhook events as triggers to handle any operations you’d want to perform on your backend.
It will also increase the scalability of your app as there are plenty of other events you can listen for [2].
[1] https://stripe.com/docs/webhooks#use-cases
[2] https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-enabled_events
How do you configure an Email Notification for an individual user in an organization for not responding in a timeframe?
Eg: An email notification gets sent if Initial Response was not met within say 6 hours of VSO being assigned.
In Azure DevOps project notification settings, it's possible to configure a notification based on the following actions taking place on a work item:
Notification settings based on a timeout, or lack of response, are not apparent.
Is it possible to configure a notification based on a lack of activity for a work item?
Currently there are below pre-defined notifications for work items in Azure Boards.
See: Manage your personal notifications for details.
I am afraid that no such notifications are designed for your requirement. However, as a workaround, we can create a query to find those work items which are not changed from New for a period when they have been assigned to members, as below.
Above query will query bugs and tasks which are assigned to members but still state in New state and they are created earlier than today across projects. See: Define a query for details.
And clicking "Email query" allows you to send this query result to specific members.
I have an endpoint responsible for creating a paid subscription. However, in order to create subscription I need to access multiple different services in succession:
1) create subscription with a token provided by front-end (generated by a direct call from front-end app to payment system) (Call to the payment system)
2) get Billing information to save in database (Call to the payment system)
3) save some of billing info (f_name, l_name) and provided shipping info (Call to the database)
4) subscribe customer to the mailing list (Call to the email service provider)
Any of these steps can fail due to service being unavailable, problems with internet connection in the DC or any other number of problems that are not controllable by developers. Is there any options to process all of this in a transaction-like manner to avoid partial completion? e.g. We create subscription, but don't write to database.
I am using Node.js, if this helps.
Have a look at the Saga pattern for microservices. This could essentially be laid out as a service which you contact when you want to create a subscription. It knows every step involved and on top of that, also knows how to roll back every transaction, should any step fail.
Upon making a request, the service would just start doing all the necessary requests/queries and then either:
Return successfully
Rollback all transactions that have happened so far and return an error
This obviously relies on all of your services being able to revert to known good state.
Another approach would be to use two-phase/n-phase commits, but they may impose a big performance drop which is not desirable for something user-facing.
You may want to read through this discussion on HackerNews where this problem is discussed in far more detail.
I am creating a bot using Microsoft Bot Framework (BotBuilder) and want it to message the user when an appointment is about to begin.
I currently use Microsoft Graph api to access the user's Office 365 calendar and store the appointments. A background thread then keeps track of time and then messages the user when an appointment is about to start.
The current idea is to use Graph webhooks to notify my bot about new appointments.
My question is, would it be smarter to use an Azure service (such as Scheduler) to keep track of the appointments, and send rest messages to my bot, which will then send a message to the user?
My worry is, that as the amount of users rise, the amount of appointments and time checks will become too large, and that maybe Azure services would be able to handle it better.
This is a perfect fit for Azure Functions with a HTTP Trigger.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook
This article explains how to configure and work with HTTP triggers and bindings in Azure Functions. With these, you can use Azure Functions to build serverless APIs and respond to webhooks.
Azure Functions provides the following bindings:
An HTTP trigger lets you invoke a function with an HTTP request. This can be customized to respond to webhooks.
An HTTP output binding allows you to respond to the request.
I'm using Azure websites and they offer email services vie the third party provider SendGrid.
It works fine so far but they put a tracking pixel in the emails in order to provide statistics. Some email clients (like Thunderbird) shows a warning message for a remote content in the email.
I want to provide safe to the maximum service for my users and want to remove this tracking pixel from the email. However I cannot find such an option in the settings.
I don't want third party content in my emails. Do you know how to remove it?
(I'm using free SendGrid plan)
Alternatively, does Azure have own SMTP service?
As per https://sendgrid.com/docs/Apps/open_tracking.html
Settings may be changed through:
SMTP API (on a per message basis)
Web API (on an account wide basis)
Web Interface (on an account wide basis) // have to log into account
You didn't say exactly how you we're implementing it, so it has links to a few different ways. Sounds like it would be easier to log into your account and disable it there.
EDIT:
updated answer from comments
go to sendgrid.com/app and its one of the three options there. with a big red disable button on it when you hover over it.