Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

first let me explain my code.
C#
var t1 = Task<int>.Factory.StartNew(() => GenerateNumbers());

Have created on task which is call one private function with async.

have some queries about this Tasks.
1.I need to invoke this task every 5 minites.
2.Any options available to make timer kind of stuffs in Tasks..

Thanks..
Posted

Use a timer - Observable.Timer Method [^].
 
Share this answer
 
You can either use a timer or (preferably) you can use a Task Scheduler class as below

A New Task Scheduler Class Library for .NET [^]

or

https://taskscheduler.codeplex.com/[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900