Hello,
I need to start a service every morning at 10:00, after executing a query.
If there are some results from the query, I want to display a notification, else not.
I can't understand how to start a service at a specific time and only after executing this query.
Please, help
But in your case you can simply use StartServiceAt which schedule the start of a service in the given time.
You only have to check not to schedule an already past time.
So, if now is before 10:00 then schedule for today at ten o'clock. If 10 is already past, schedule for tomorrow at 10.
In the Sub Service_Start you can use StartServiceAt in order to schedule the next task,
It also depends on 'after only 5 minutes' from what?
If it is from now you can just call StartServiceAt with a scheduled time of date time.now + 5*60*1000 (5 minutes x 60 seconds x ticksXsecond)