close method

void close()

Stops the cron job and cleans up resources.

This method changes the cron status to CronStatus.stopped and closes the internal timer.

Implementation

void close() {
  _timer?.cancel();
  _timer = null;
  _status = CronStatus.stopped;
}