Click here to Skip to main content
15,914,225 members
Home / Discussions / C#
   

C#

 
GeneralRe: Property grid tutorial Pin
Heath Stewart2-May-05 5:18
protectorHeath Stewart2-May-05 5:18 
GeneralJoinMulticastGroup Pin
udir2-May-05 2:06
udir2-May-05 2:06 
GeneralRe: JoinMulticastGroup Pin
leppie2-May-05 3:13
leppie2-May-05 3:13 
GeneralRe: JoinMulticastGroup Pin
udir2-May-05 3:40
udir2-May-05 3:40 
GeneralWindows Service Pin
kunalshah_19832-May-05 2:01
kunalshah_19832-May-05 2:01 
GeneralRe: Windows Service Pin
Heath Stewart2-May-05 5:30
protectorHeath Stewart2-May-05 5:30 
GeneralRe: Windows Service Pin
kunalshah_19832-May-05 18:23
kunalshah_19832-May-05 18:23 
GeneralRe: Windows Service Pin
Heath Stewart3-May-05 5:16
protectorHeath Stewart3-May-05 5:16 
It's not as easy as you think. Are you going to take into account resiliency (so that if the computer goes down either gracefully or not, when it comes back up the timer accounts for lost time)? What about security (what account does the service NEED to run under, i.e. what are the minimum privileges required)?

Again, this is a simple solution if you write it using native C++. The steps I outlined are only necessary if you want to do this in native code. If you're doing this as part of a managed application, you could write the implementation in native code and then P/Invoke a simple function exported from your native DLL from your managed application:

sched.dll (native)
ScheduleTask(TaskStruct task);

app.exe (managed)
P/Invoke ScheduleTask;
Declare TaskStruct;

If you are going to handle resiliency and security yourself (which the Task Scheduler already does), then you should look at the Timer classes in the .NET Framework I mentioned in my previous post. You can find these in your .NET Framework SDK that VS.NET installs by default (just click the Help menu, select Index, then type "Timer class". These are also available online at the following URLs:

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft

[My Articles] [My Blog]
GeneralCreate Folder on server Pin
Prerak Shah2-May-05 1:45
Prerak Shah2-May-05 1:45 
GeneralRe: Create Folder on server Pin
Heath Stewart2-May-05 5:21
protectorHeath Stewart2-May-05 5:21 
GeneralRe: Create Folder on server Pin
Judah Gabriel Himango2-May-05 5:22
sponsorJudah Gabriel Himango2-May-05 5:22 
GeneralSwitching User Controls with NavBar Pin
Anonymous2-May-05 1:44
Anonymous2-May-05 1:44 
GeneralRe: Switching User Controls with NavBar Pin
MoustafaS2-May-05 1:48
MoustafaS2-May-05 1:48 
GeneralRe: Switching User Controls with NavBar Pin
Anonymous2-May-05 2:20
Anonymous2-May-05 2:20 
GeneralHelp -- Tool Bar Control Pin
Umair Tariq2-May-05 0:49
Umair Tariq2-May-05 0:49 
GeneralRe: Help -- Tool Bar Control Pin
Dave Kreskowiak2-May-05 3:59
mveDave Kreskowiak2-May-05 3:59 
GeneralDecompile Pin
StephenMcAllister1-May-05 23:42
StephenMcAllister1-May-05 23:42 
GeneralRe: Decompile Pin
M.Waseem Chishti2-May-05 0:51
M.Waseem Chishti2-May-05 0:51 
GeneralRe: Decompile Pin
S. Senthil Kumar2-May-05 4:15
S. Senthil Kumar2-May-05 4:15 
GeneralListing Local Users/Groups Pin
Jaymz6661-May-05 23:35
Jaymz6661-May-05 23:35 
GeneralRe: Listing Local Users/Groups Pin
Jaymz6662-May-05 4:31
Jaymz6662-May-05 4:31 
GeneralProblem in double click event of datagrid Pin
joy_priyank1-May-05 23:22
joy_priyank1-May-05 23:22 
GeneralRe: Problem in double click event of datagrid Pin
Dave Kreskowiak2-May-05 3:56
mveDave Kreskowiak2-May-05 3:56 
GeneralRe: Problem in double click event of datagrid Pin
joy_priyank2-May-05 19:11
joy_priyank2-May-05 19:11 
General.NET Framework SDK Version 1.1 for C# Pin
Anonymous1-May-05 21:30
Anonymous1-May-05 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.