C
Christina Haller
Hi
Is it possible to do something like that:
1. there is a file located on my website
2. I would like to start a webservice that copies that file each 24 hours to
a backup dir on the website
3. The webservice should be self running (without a client connection)
Until now, I tried the following stuff, but the timer does not run when i
call the method starttimer! I was thinking that the modal variable mVal will
count up on each timer_tick and the stoptimer returns then the amount of
ticks done. But nothing comes back.
Any idea?? Thanks
1. Builded a webservice containing 2 Methods and 1 Timer
Public mVal As Long
<WebMethod()> _
Public Function StartTimer() As String
Timer1.Interval = 1000
Timer1.Start()
StartTimer = CStr(mVal)
End Function
<WebMethod()> _
Public Function StopTimer() As String
Timer1.Stop()
StopTimer = CStr(mVal)
End Function
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
mVal = mVal + 1
End Sub
Is it possible to do something like that:
1. there is a file located on my website
2. I would like to start a webservice that copies that file each 24 hours to
a backup dir on the website
3. The webservice should be self running (without a client connection)
Until now, I tried the following stuff, but the timer does not run when i
call the method starttimer! I was thinking that the modal variable mVal will
count up on each timer_tick and the stoptimer returns then the amount of
ticks done. But nothing comes back.
Any idea?? Thanks
1. Builded a webservice containing 2 Methods and 1 Timer
Public mVal As Long
<WebMethod()> _
Public Function StartTimer() As String
Timer1.Interval = 1000
Timer1.Start()
StartTimer = CStr(mVal)
End Function
<WebMethod()> _
Public Function StopTimer() As String
Timer1.Stop()
StopTimer = CStr(mVal)
End Function
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
mVal = mVal + 1
End Sub