Event scheduler notification [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am working on code to send an sms to customer one week before their subscription reach expiration date. I absolutely don't know how to proceed. I am coding in asp.net c# and sql server.

Create one console Application which will take user whos expiration comes in week, Then write code to fetch the user with there numbers. Then use any third party Api to send sms. you have to send parameters to this Api with your appropriate message.
Then create one job inside sql server which will run everyday which will execute your Console Application code to send SMS.

I would say, separate out publishing and subscription tasks. So in future you can do more with such customers.
Prepare a Publisher which looks for such customers and adds a task to Queue.
Write a Subscriber who watch outs for new queue items and take action.
So in future if you want to make multiple way of communicating to customer like, email then you just need to add more subscriber.
Host your logic as a .NET windows or IIS service.
Benefit: Publisher can independently perform addition.
Subscriber performs task as soon it sees something in queue.

Related

Best method for sending bulk sms and email. Whether a cron or a scheduler service [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I want to send Email and SMS in bulk in c# MVC. So, method would be better, cron in a web application or separate scheduler service for it?
I have a web application running already. So, should I integrate the cron in the web app itself or create a new scheduler service for it.
I want to use the best method in terms of reliability, speed and load of data.
its better to make separate service for that for the below reasons :
1- Maintainability : If there is a problem in sending mails or SMS you know where you need to check without going to your main solutions.
2- Availability & Scalability : You can scale this Module only or if any thing happens to your main app, your mailing and sms will still be working.
3- Separation of Concerns : SMS and Emailing is considered to be a cross cutting functionality that it will be used in alot of places in system, so it is better to have it in one separate place.
4- I/O latency : like this you will avoid any latency or any performance effects on your main business domain.

c# notify a running process [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to somehow notify a running process from the "outside"?
I have a C# program that theoretical runs forever. And I would like to notify it to trigger some action manually. It would be best, if this solution is possible on Windows and Linux (mono).
EDIT:
The solution should work without a user interface
My program is, as for now, a part of web service. On initializing, a new Theread is created, which uses the Task class to stay alive
Take your forever-running-process and let it provide a webservice other processes can call.
You might use any cross-plattform webservice framework like WebApi or ServiceStack to achieve this via HTTP calls. This will even work over the internet (if the machines can reach each other).
There are dozens of approaches. You could also use named pipes for example, or put commands into a database (the other process has to query regularly) or - if you're fearless enough - write/read files to communicate. Be creative ...

Ideal way for implementing server side of push notification using .Net [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
In One of my web application, I need to push ToDo type of information on server database, to the client as push notification. What will be the efficient way of invoking a push notification call. Should it be a standalone Windows service that can track the data in the database, every few minutes and invoke the Push notification call via GCM or APNS. or is there any other better way of doing this.
The application can run on both internet or intranet environment. This is not an event based notification, The data in the database need to monitor frequently and invoke the push notification service if required.
Universal answer: It depends...
Do you have any mechanisms that can detect when it is time to send the push notification? Like a message that gets dropped in a queue, a file that gets created, an event triggered from a SQL Server Broker, etc. ?
If the answer is YES, then you probably should use this mechanism to trigger sending your push notification.
If the answer is NO, then you probably will end up with a Windows Service that queries a database (or some other store) every few seconds/minutes/hours

Limit email sending to 1000 emails per day - own smtp - C# - Windows Form Applicaiton [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
In windows Form Application, I am using Mail Definition class to send HTML emails. I got help from this post
Generating HTML email body in C#
I want to send 1000 emails per day. Do I need to set some SMTP setting or I need to write my own code to handle this.
I am thinking to put all the emails in SQL Server table and then select 1000 per day and then delete the addresses to whom email is sent. My approach is good or bad ?
Thanks
You can obviously write your own application to handle this, it's not a major challenge just create a list and take the top 100 each day.
I'm going to assume that you're not simply spamming people and have their permission to contact them. You will also have their email client's spam filters to worry about, in the scheme of bulk email a thousand is not a lot - however each SMTP server builds up a particular reputation based on it's domain and IP address. If you fail these tests you will be delivered into the junk folder (if at all!).
By taking on this work yourself you're likely to have less success than using a 3rd party MailChimp for example. Companies like this spend a long time nurturing their sender reputation and screening their clients (so they don't allow spammers to use their servers). Take a look at my answer to this question to see some of the issues you'll face.

Email Newsletter [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working on a newsletter. Newsletter content is saved in the table along with frequency such monthly, weekly, daily. Newsletter also have start date. What I have to do is based on the data and frequency. Newsletters are emailed to all the subscribers. My confusion is that whether I need to write a sql server job for this or simply asp.net can do this. If yes then how would I be able to do this.
As your web application will be terminated in times of inactivity, you usually have a service or task scheduler run such periodical tasks. Also your web application is responsible to return requests quickly and should run with a very limited set of permissions that might not be enough for your jobs (it is preferable not to allow the app pool account to send e-mails to lots of accounts).
There are various alternatives that differ in terms of convenience and deployment of your application.
An important requirement besides the capability to run jobs periodically is how you can trace errors in the job, so you should think about your logging strategy before the first problems arise.
Besides writing a SQL Server job, you could also:
Create a console application and use Windows task scheduler to run it periodically (interval is the minimum of your scheduling options, in your question daily). This is easy to implement, but requires some steps to deploy it to a computer.
Create a dedicated windows service that is installed to the computer. While this requires more effort to create and test the service, you can also create an installer to simplify the deployment.
I eventually went for the application events. I set the timer in application event and it works similar like jobs and windows services.

Categories

Resources