| BackgroundJobScheduleT Method (ExpressionActionT, TimeSpan) |
Creates a new background job based on a specified instance method
call expression and schedules it to be enqueued after a given delay.
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,
TimeSpan delay
)
Public Shared Function Schedule(Of T) (
<NotNullAttribute><InstantHandleAttribute> methodCall As Expression(Of Action(Of T)),
delay As TimeSpan
) As String
Parameters
- methodCall
- Type: System.Linq.ExpressionsExpressionActionT
Instance method call expression that will be marshalled to the Server. - delay
- Type: SystemTimeSpan
Delay, after which the job will be enqueued.
Type Parameters
- T
- Type whose method will be invoked during job processing.
Return Value
Type:
StringUnique identifier of the created job.
See Also