Click here to Skip to main content
15,943,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a windows form application
and is installed in more than two systems
in LAN or say in network.

When Any modification is done in the
Main Module. Updates are sent
to each system using a windows
service which run in background in every system.

When update reaches to particular system
a notifyIcon notifies the user that updates
are available ,and then updating starts.

Updation is scheduled as per the updateinterval time set in the app.config file which
is a xml file .There we can Set manually the interval after which the updation
should start.

Now I want here that
a user Interface so that
user can schedule the service as Daily ,Hourly,weekly and Now options by setting a specific time of the day and week.

As we all have seen in case of Java updates .There is a system tray Icon.On right clicking the Icon it shows the Updation/scheduling options.

I want the some how the same Functionality .Am thinking of Context menu ,but how should i set the Time Interval.

Any Examples or Idea.
Please assist.

1 solution

Of course, you can use the timer inside your service and calculate appropriate times to launch your scheduled actions. The timing should be calculated based on the current time (System.DateTimeNow). But alternatively you can use external service already available in Windows.

It is already bundled with Windows and enabled; you can use it on different levels. It is called Window Task Scheduler, see[^].

First, you can schedule events using command-line utilities AT.EXE or CSHTASKS.EXE (which is replacing AT.EXE), see:[^],[^],[^],[^].

And you also can use Window Task Scheduler API, please see:[^],[^].

To see how can you use it with .NET, see this CodeProject article: A New Task Scheduler Class Library for .NET[^].

Share this answer

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