Post Reply 
VB.NET schedulling
02-10-2012, 08:41 PM
Post: #1
VB.NET schedulling
Situation is that wrote some small software which is doing some tasks for me. There must some code that would repeat this tasks every hour. And I`m looking for it. I have tried windows schedulling, but i would like to know code for vb.net. Every advice is welcome Smile
User Tools
Quote this message in a reply


02-10-2012, 09:50 PM
Post: #2
RE: VB.NET schedulling
Do you need help on programming whole program?
(not as hard as photoshop etc)
If you need it,
i will charge it at a normal charge...
it WOULDN'T more than $20

If you don't need help on whole program,
i will help you on this...

User Tools
Quote this message in a reply
02-10-2012, 09:52 PM
Post: #3
RE: VB.NET schedulling
I could ask a friend who has knowledge with VB.Net.

No charges for you. Why should I take fees for this Confused.
User Tools
Quote this message in a reply
02-10-2012, 11:32 PM
Post: #4
RE: VB.NET schedulling
One simple solution is that you leave the program always open (as a notification icon in the taskbar or something) and use a Timer with tick count equals to 1 hours. For each tick count event triggered, run your desired code. Maybe via a thread for long running tasks.

If you want the program to automatically start at Windows startup, simply put a shortcut of the compiled exe in Startup folder in Windows Start menu.



But why write the code when Windows scheduler already solve your problem?

Thân,

iCarrot.
User Tools
Quote this message in a reply
02-10-2012, 11:50 PM
Post: #5
RE: VB.NET schedulling
(02-10-2012 09:50 PM)Doraemon Wrote:  Do you need help on programming whole program?
(not as hard as photoshop etc)
If you need it,
i will charge it at a normal charge...
it WOULDN'T more than $20

If you don't need help on whole program,
i will help you on this...
Thank you, I have part done. And I`m looking only for schedulling.

(02-10-2012 11:32 PM)iCarrot Wrote:  One simple solution is that you leave the program always open (as a notification icon in the taskbar or something) and use a Timer with tick count equals to 1 hours. For each tick count event triggered, run your desired code. Maybe via a thread for long running tasks.

If you want the program to automatically start at Windows startup, simply put a shortcut of the compiled exe in Startup folder in Windows Start menu.



But why write the code when Windows scheduler already solve your problem?

Because there will scheduller only of one process inside the programm. And I`m looking for turning it on or off.
User Tools
Quote this message in a reply
02-11-2012, 03:30 PM
Post: #6
RE: VB.NET schedulling
The most efficient way is probably the way you are already doing it with schtasks.

If you just want pure vb.net code create a Timer.
User Tools
Quote this message in a reply
02-12-2012, 08:47 AM
Post: #7
RE: VB.NET schedulling
I think the only way you can do time based events in Visual Basic is by using the Timer tool.

Code within the Timer event executes every time the tool "ticks".
Change the tick value to 500 and the event will execute every 5 seconds. You'll have to find out how many milliseconds are in one hour.

Remember the Timer tool is NOT enabled when you create it. You can either enable it to run at the start of the program, or change your program code to later enable after a button click.

I hope this helps.

[Image: robcollins.png]

/$ Currently: Studying Software Development at College.
User Tools
Quote this message in a reply
02-12-2012, 10:23 AM
Post: #8
RE: VB.NET schedulling
robert say it right,
it was just these...

User Tools
Quote this message in a reply
02-15-2012, 01:16 AM
Post: #9
RE: VB.NET schedulling
For me, I'll go with f8ll solution as it will be efficient since your program will only be run when its needed, unlike if you will have it running all the time even just the Timer running while its waiting, it will still consume a little bit of CPU process and memory.

Thanks FreeVPS.us! for the free VPS and for all the knowledge that I've learned here at the forum.
User Tools
Quote this message in a reply
Post Reply 


Forum Jump:



User(s) browsing this thread:
1 Guest(s)