Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2005, 05:52 AM
Authorized User
 
Join Date: Dec 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default Scheduling a task

Hi

I'm looking for a way to run my application in the background based on scheduled date and time, that is set in config file by client.

1. Should I use a windows service ? and if yes, do I have to reconstruct my whole app as windows service (currrently it's a windows forms app) ?
2. Any assistance about event handler for scheduling a process in the application.

Thanks!
 
Old February 7th, 2005, 03:13 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Do you want it to start running in the background at a certain time, or do you want it to be running in the background and perform a certain task at the appointed time?
 
Old February 8th, 2005, 04:40 AM
Authorized User
 
Join Date: Dec 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default

The first one sounds more like an ideal for this app.
The client set the schedule (daily, weekly etc) at a certain time, just like Norton AV.
Once the schedule is set, the app .exe (no UI) will be called accordingly, run its process (preferably in the background), and dispose when finished.

The Scheduled Tasks would be a good option, so I'm looking for a simple way to code it from vb.net
Any other thoughts or ideas would be helpful.

Thanks!
 
Old February 9th, 2005, 12:57 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Well, Windows has a task scheduler built in.
Add the .EXE to that, and it will run.
It is up to the .EXE then to kill itself when it is done, of course.

In Win2K you right-click My Computer,
expand the Control Panel node,
select Scheduled Tasks,
then double-click Add Scheduled Task in the right-hand panel.
 
Old February 15th, 2005, 04:13 AM
Authorized User
 
Join Date: Dec 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default

Hi Brian

The Task Scheduler is a great tool, but I had to find a way to work with it thru coding. This became much easier with Dennis Austin's class library for working with the Task Scheduler from .NET (http://www.codeproject.com/csharp/TSNewLib.asp). It's written in C#, includes excellent MSDN-like documentation and provides full configuration of the Task Scheduler.

Cheers!!
 
Old April 29th, 2007, 11:57 PM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have got to do a scheduled(every year) task running in the background
of a dotnetnuke application.I understand that it can be done using dotenetnuke scheduler client.But I don't know how to use it.So if anybody can help me out this problem I would be very grateful.Thanks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add task in Scheduled Task programatically amitjoshipune C# 2 July 31st, 2008 05:42 AM
Scheduling mwahab Excel VBA 0 February 23rd, 2007 02:24 PM
Scheduling DTS task on SQL Server 2005 ahamilto SQL Server DTS 4 March 29th, 2006 01:51 PM
Execute Task from ActiveX Script Task PorcupineRabbit SQL Server DTS 1 January 10th, 2006 12:37 PM
Scheduling mrkyn Classic ASP Basics 4 December 1st, 2003 03:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.