Hola que tal!
Alguien podría ayudarme en decirme como puedo poner el siguiente código en C#, porque está en VB:
Set objJobScheduler = Server.CreateObject("ADEXSchedule.JobScheduler")
Gracias!
Saludos!
| |||
![]() Hola que tal! Alguien podría ayudarme en decirme como puedo poner el siguiente código en C#, porque está en VB: Set objJobScheduler = Server.CreateObject("ADEXSchedule.JobScheduler") Gracias! Saludos! |
| |||
Segun yo es un objeto tipo ADEXSchedule.JobScheduler. Es que en la página de este componente viene el código para crear esta instruccion, pero no son para C#. solo la linea en negritas me marca error. How do I add a new task using AddTaskEx method? 2.A. Dim objJobScheduler As Object Dim strTaskName As String 'Name of the task Dim strAppName As String 'Full path of the application to be scheduled Dim strParameters As String 'Command line parameters ,if any to the application Dim strUserName As String 'Run As account Dim strPassword As String 'Password for Run As account Dim iRunType As Integer 'Run Type - ADEXSchedule.TaskRunType Dim iPeriodicity As Integer 'Periodicity - ADEXSchedule.TaskPeriodicity Dim strStartTime As String Dim strStartDate As String Dim strEndDate As String strTaskName = "ADEXScheduleTask" strAppName = "C:\winnt\notepad.exe" strParameters = "" strUserName = "research\administrator" 'DOMAIN\USERNAME strPassword = "" iRunType = 0 'Optional parameters strStartTime = "12:00" 'hh:mm 24 hour format strStartDate = "01/28/2004" 'mm/dd/yyyy format strEndDate = "01/29/2004" 'mm/dd/yyyy format iPeriodicity = 0 Set objJobScheduler = CreateObject("ADEXSchedule.JobScheduler") 'Add task with extended parameters using AddTaskEx method Call objJobScheduler.AddTaskEx(strTaskName, strAppName, strParameters, strUserName, strPassword, iRunType, strStartTime, strStartDate, strEndDate, iPeriodicity) Set objJobScheduler = Nothing |