title: how to detect when NodeJs schedule's last job execution occurs?
body: <p>is there a way to check when the last job execution, i need to delete the job from the databse when the scheduled job ends.</p>
  <p>thanks in advance.</p>
  <p>here is the code of creating the job:</p>
  <pre><code>
      const job = schedule.scheduleJob(
        {
          start: scheduledJob.startTime,
          end: scheduledJob.endTime,
          rule: cronExp,
        },
        () =&gt; {
          this.jobService.send(scheduledJob);
          console.log(&quot;sent notification&quot;);
        }
      );
  
  </code></pre>