How to queue one shot job for a specific time?


#1

I was wondering how I can queue a one time job for a specific day? In the docs I can queue up recurring jobs like daily jobs for a specific time but I can’t seem to find a one time job that occurs like at 23 August at 18:15. Is this possible?


#2

You can try

RecurringJob.AddOrUpdate(() => Console.Write("Powerful!"), "15 18 23 8 *");

Or schedule mathod with “target time-now”

https://docs.hangfire.io/en/latest/background-methods/calling-methods-with-delay.html


#3

Thank you! I will give this a try :slight_smile: