| BackgroundJobScheduleT Method (ExpressionActionT, DateTimeOffset) |
Creates a new background job based on a specified method call expression
and schedules it to be enqueued at the given moment of time.
Namespace: HangfireAssembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax public static string Schedule<T>(
[NotNullAttribute][InstantHandleAttribute] Expression<Action<T>> methodCall,
DateTimeOffset enqueueAt
)
Public Shared Function Schedule(Of T) (
<NotNullAttribute><InstantHandleAttribute> methodCall As Expression(Of Action(Of T)),
enqueueAt As DateTimeOffset
) As String
Parameters
- methodCall
- Type: System.Linq.ExpressionsExpressionActionT
Method call expression that will be marshalled to the Server. - enqueueAt
- Type: SystemDateTimeOffset
The moment of time at which the job will be enqueued.
Type Parameters
- T
- The type whose method will be invoked during the job processing.
Return Value
Type:
StringUnique identifier of a created job.
See Also