Re: VB.Net Console app needs timer



On Jul 5, 3:08 pm, "Al G" <agerha...@xxxxxxxxxxx> wrote:
"Scott M." <quan...@xxxxxxxxx> wrote in message

news:1183661709.081614.76360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





On Jul 5, 2:41 pm, "Egghead" <robertlo@xxxxxxxxxx> wrote:
Why not use the scheduler?

--
cheers,
RL"Scott M." <quan...@xxxxxxxxx> wrote in message

news:1183656651.419053.180430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi,

I'm an old VB6 guy just starting out in VB.Net using Visual Studio
Express. I want to build a simple console app that will create a
simple text file every 10 minutes. I can create the file OK, but how
do I put in the timer so that I can write the file on schedule? The
idea behind this project is to help me monitor remote computers in a
production environment to make sure that they are up and running. I
currently synchronize files on them using DriveHQ.com. What I want to
do is be able to examine my DriveHQ account and see, from what I write
in the text file, that my systems are up and running.

The app coding so far is this;

'create file
My.Computer.FileSystem.WriteAllText("C:\Test.txt",
String.Empty, False)
'write file header
My.Computer.FileSystem.WriteAllText("C:\Test.txt", "Heartbeat
File" & vbCrLf, True)
'write current date/time to file
My.Computer.FileSystem.WriteAllText("C:\Test.txt", Now() &
vbCrLf, True)

Scott- Hide quoted text -

- Show quoted text -

I am too new to VB2005 to know how to use it. Can you give me a hint?

Start Menu > Settings > Control Panel > Scheduled Tasks > Add Task...

Al G- Hide quoted text -

- Show quoted text -

Oh, that scheduler. I can use it to launch my tiny program, but I need
the program to write out my heartbeat file every ten minutes. I could
just as easily put my program in the startup folder.

.



Relevant Pages

  • Re: VB.Net Console app needs timer
    ... I want to build a simple console app that will create a ... do is be able to examine my DriveHQ account and see, ... 'write file header ... File" & vbCrLf, True) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB.Net Console app needs timer
    ... I want to build a simple console app that will create a ... do is be able to examine my DriveHQ account and see, ... 'write file header ... File" & vbCrLf, True) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB.Net Console app needs timer
    ... I want to build a simple console app that will create a ... do I put in the timer so that I can write the file on schedule? ... Set the scheduled task ... I can launch a task any more than once per day. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB.Net Console app needs timer
    ... I want to build a simple console app that will create a ... File" & vbCrLf, True) ... This may not be the "proper" way - but I never cared about being ... Public Sub timer_Tick(ByVal sender As Object, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB.Net Console app needs timer
    ... do I put in the timer so that I can write the file on schedule? ... File" & vbCrLf, True) ... But that will only launch your program once. ...
    (microsoft.public.dotnet.languages.vb)

Loading