Método Job.Create
Creates a job on the instance of Microsoft SQL Server as defined by the Job object.
Namespace: Microsoft.SqlServer.Management.Smo.Agent
Assembly: Microsoft.SqlServer.Smo (em Microsoft.SqlServer.Smo.dll)
Sintaxe
'Declaração
Public Sub Create
'Uso
Dim instance As Job
instance.Create()
public void Create()
public:
virtual void Create() sealed
abstract Create : unit -> unit
override Create : unit -> unit
public final function Create()
Implementa
Exemplos
The following code example creates a new job.
C#
Server srv = new Server("(local)");
Job jb = new Job(srv.JobServer, "Test Job");
jb.Create();
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job($srv.JobServer, "Test Job")
$jb.Create()
Consulte também
Referência
Namespace Microsoft.SqlServer.Management.Smo.Agent
Outros recursos
Tarefas de administração automatizadas (SQL Server Agent)
Agendando tarefas administrativas automáticas no SQL Server Agent