0

Using VS 2015 and Visual Basic.

I have a web application and I want to trigger a scheduled task (TaskA) on a remote server (ServerA) when the application loads.

I have been looking at the following question but I cannot get this to work, partly because its in c# (c# to vb converters throw an error) and also I have imported the nuget package but the namespace isn't recognised.

C# Starting a remote scheduled task

For example if I start with the following VS doesn't like it. the line is highlighted to me saying it is a namespace and cannot be used as an expression.

  Using Microsoft.Win32.TaskScheduler

    End Using

All I want my app to do is trigger the tasks, I don't need a response etc.

Can anyone help

Community
  • 1
  • 1
Silentbob
  • 2,805
  • 7
  • 38
  • 70
  • Try looking at the solution to the Question "Microsoft.Win32.TaskScheduler NOT FOUND - I want to import this namespace in VB.NET" in another post on Stack Overflow http://stackoverflow.com/questions/2892014/microsoft-win32-taskscheduler-not-found-i-want-to-import-this-namespace-in-vb – PhillipH Sep 19 '16 at 10:16
  • Another option is to use the command line `schtasks` command to trigger it. [See here](https://technet.microsoft.com/en-us/library/cc721884(v=ws.11).aspx) for more details – FloatingKiwi Sep 19 '16 at 10:18
  • PhillipH - when I try to do that it says it is already added – Silentbob Sep 19 '16 at 10:24

0 Answers0