I'm making a windows worker service that needs to do some web scraping once every 24 hours.
I want the scraping that it does to depend on the last time it ran, and the data that it picked it. I does'nt need to know a lot about the previous session, but something like knowing a boolean value set by the last session would be enough.
Is there any way to make a worker service remember what happened in the session before? Like, converying a little information from the last session?
Well you can simply store what ever data you need in a class inside your service. To persist the data you can deserialize the class into the service working directory so that your data is not lost when the service crashes or gets updated. Further, you can off course persist the data in a database.