Package job

Class JobScheduler

java.lang.Object
job.JobScheduler

public class JobScheduler extends Object
Schedules and executes background jobs using thread pool.
Author:
TAMIL MUGHILAN
  • Field Details

  • Constructor Details

    • JobScheduler

      public JobScheduler()
  • Method Details

    • scheduleJob

      public void scheduleJob(BankingJob job, long initialDelay, long period, TimeUnit timeUnit)
      Schedules a job to run repeatedly at fixed intervals.
      Parameters:
      job - the banking job to schedule
      initialDelay - delay before first execution
      period - time between executions
      timeUnit - unit for delay and period (SECONDS, MINUTES, etc.)
    • shutdown

      public void shutdown()
      Shuts down the job scheduler only if no jobs are running.