Create
pulse.create(name, data)
pulse.create(name, data)
The create
method generates a new job instance based on a specified job type and data. It is a preliminary step in the job lifecycle, allowing for the customization of job parameters before the job is scheduled and executed.
This does NOT save the job in the database. you must explicitly declare save()
if you want to save it
Example Usage
Parameters
name
(string
): The name of the job to be created. This name should correspond to a job type previously defined with thedefine
method, which dictates certain default settings such as priority and result-saving behavior.data
(T
): Data to pass to the job for its execution. This data is used within the job's processing logic and can be any type of data that the job requires.
Returns
Job<T extends JobAttributesData>
: Returns a newJob
instance configured with the provided name and data.
Last updated