ASP.NET Service - Web or Windows? - asp.net

I'm looking for a method in which an application I will be hosting will have the ability to run a tasks on a giving interval of x minutes to check a database and send out reminder emails automatically. This would of course be based upon a scenario in which someone has scheduled a meeting, let's say, on a day and the service's job would be to send a reminder a week prior to the meeting and on the day of the meeting. Would I be looking to run a Windows Service to complete this function or is there a better way to do such a thing? Not asking for full source just a push in the right direction. Thanks for the guidance in advance!

sounds like a windows service would work good here. Set a timer in the service that will read your database at the given interval and perform the actions you want.
Here's a link that might help you to get started.

Related

Using Firebase as a scheduler

2 years back, I was tasked to quickly build a system for an Health Club that was hit by the Covid pandemic. The system was built within a week & I used what technology I was comfortable with and deployed the system.
The requirements were simple - A member subscribes to a program and he gets regular, timely notifications via FCM. The signup date of the member is rolling, hence it has to follow the n+number of days & time schedule logic.
I built this using simple php with nodejs handling the scheduler. The scheduler runs every minute, checks the mariadb database and runs a loop to send these notifications. This is running correctly at the moment. Having said this, I know this is not the optimal way of doing a solution like this.
I would compare this to the "Autoresponders" we set in any mailing system. Once a person joins, we can schedule Autoresponders - the sending and delivery is managed by the mailing provider.
I wanted to understand if I can use Topics or Realtime / Firebase database to achieve this?
I know it's a super generic question, but if someone can point me in the right direction, I would appreciate it.
Regards,
Mihir.
PS: I am insisting on Firebase because my apps are already integrated with it and would not require much of work to run these changes.

Send push notifications with PHP

I am thinking of trying to implement push notifications into my website. Essentially I would just need to message individual users of personal updates not everyone that has agreed. I have looked and researched a lot and its confusing where to start, what I need, what language to use etc.
I use 1and1.co.uk for my hosting and would like to use PHP to instigate the push. Is this possible from what they offer and if so where do I start?
All the paid stuff seems to offer just bulk notifications and that is not what I need and why should I pay for it if its possible to do myself.
Also how difficult and time consuming is the process?
If I get enough advice and manage to get it working, I will write a step by step tuition as there is nothing out there with a simple answer and instructions.
Thanks and regards
If you don't need it in time, you can do it using Ajax polling, which means executing Ajax requests every few seconds.

How to send mail at a certain time from asp.net web application

I am new to asp.net. I have a project working. I need to send different mails every day at 12 am to different users. I need to know how to implement the method that will wake up every day at a certain period. Please help me with as much details possible as I am a complete beginner
Use Quartz.NET.
Quartz.NET is a full-featured, open source enterprise job scheduling system written in .NET platform that can be used from smallest apps to large scale enterprise systems.
You can use Windows Task Scheduler as well, but you need some specific windows permissions to do that on production server.
You can create a Windows Service that will be executed automatically at the time you want. The windows service should contain the code to send email.You can check out these links on Simple Windows Service Sample and Simple Windows Service which sends auto Email alerts. You can also implement a timer in your application that can manage it. If you want to do it this way then check this article.

How do I implement Quartz.Net to schedule tasks for my MVC3 web app?

I'm building a project to send messages to users. The client wants a way to schedule these messages to be sent out at a certain time, for example, he creates the message at 2am but wants it to be sent out at 10am without his intervention, where do I begin with this sort of thing? I'm using ASP.NET MVC3, any help is appreciated.
Update
Darin has suggested Quartz.net, I've finally gotten around to attempting to set it up. But I'm not really understanding how to implement it with my web app.
I'm assuming I should be able to make an httprequest from my service to an action on my webapp, triggered by quartz. But I'm not sure how to communicate between the webapp and this service, such as sending instructions to the quartz server.
So far, I've created a windows service, set up the installers, and added the Quartz.net server 2010 solution to my service project, am I on the right track?
Using a managed Windows Service with Quartz.NET or a console application which you would schedule with the Windows task scheduler seems like a good approaches to achieve that.
Welp, there are scheduled tasks... either make a localhost request at a specific time, or write an executable/service to be called.
A possible alternative if you can't use scheduled tasks (but may be dependent upon the website being available to the Internet) is to make a remote request-maker program or use a website monitoring service. Have either of those make a request to a particular page/querystring on your site periodically. Then, make the web application perform a particular task (send an email) whenever that resource is requested.
A few free monitoring services are limited to one request every hour or half-hour, or you can pay to have it checked more often. The resource's code could be made to record the message-sending event, (thus making them only get sent once, regardless of how often the request is made)

Looking for guidance on WF4

We have a rather large document routing framework that's currently implemented in SharePoint (with a large set of cumbersome SP workflows), and it's running into the edge of what SP can do easily. It's slated for a rewrite into .NET
I've spent the past week or so reading and watching WF4 discussions and demonstrations to get an idea of WF4, because I think it's the right solution. I'm having difficulty envisioning how the system will be configured, though, so I need guidance on a few points from people with experience:
Let's say I have an approval that has to be made on a document. When the wf starts, it'll decide who should approve, and send that person an email notification. Inside the notification, the user would have an option to load an ASP.NET page to approve or reject. The workflow would then have to be resumed from the send email step. If I'm planning on running this as a WCF WF Service, how do I get back into the correct instance of the paused service? (considering I've configured AppFabric and persistence) I somewhat understand the idea of a correlation handle, but don't think it's meant for this case.
Logging and auditing will be key for this system. I see the AppFabric makes event logs of this data, but I haven't cracked the underlying database--is it simple to use for reporting, or should I create custom logging activities to put around my actions? From experience, which would you suggest?
Thanks for any guidance you can provide. I'm happy to give further examples if necessary.
To send messages to a specific workflow instance you need to set up message correlation between your different Receive activities. In order to do that you need some unique value as part of your message data.
The Appfabric logging works well but if you want to create custom a custom logging solution you don't need to add activities to your workflow. Instead you create a custom TrackingParticipant to do the work for you. How you store the data is then up to you.
Your scenario is very similar to the one I used for the Introduction to Workflow Services Hands On Lab in the Visual Studio 2010 Training Kit. I suggest you take a look at the hands on lab or the Windows Server AppFabric / Workflow Services Demo - Contoso HR sample code.

Resources