Re: VB.Net Console app needs timer




"Scott M." <quanker@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


.



Relevant Pages

  • 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? ... '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 ... 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
    ... 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)
  • VB.Net Console app needs timer
    ... I'm an old VB6 guy just starting out in VB.Net using Visual Studio ... I want to build a simple console app that will create a ... File" & vbCrLf, True) ...
    (microsoft.public.dotnet.languages.vb)

Loading