Skip to content

gabriaum/smart-task-scheduler-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Task Scheduler

Simple task scheduler built in pure Java using ScheduledExecutorService.

The application loads scheduled tasks from a JSON file and executes them based on their configured start time.

How it works

  • Tasks are loaded from ~/.smart-task-scheduler/tasks.json
  • Each task must define a start timestamp
  • Optional end timestamp defines the execution validity window
  • Tasks are scheduled using ScheduledExecutorService

Running the application

./mvnw clean package
java -jar target/smart-task-scheduler.jar

Task JSON format

[
  {
    "name": "Daily report",
    "start": "2026-02-01T10:00:00Z",
    "end": "2026-02-01T10:05:00Z",
    "priority": "MEDIUM"
  }
]
  • start is required and must follow ISO-8601 format with timezone
  • end is optional and defines task expiration

Technical decisions

  • Uses Instant to represent absolute time
  • Custom Gson TypeAdapter for Java Time support
  • Defensive validation for invalid or expired tasks
  • No external scheduler frameworks (Quartz, Spring)

Limitations

  • Tasks are not persisted after execution
  • Scheduler state is lost when the JVM stops

About

A Java project that simulates an intelligent task scheduler, focusing on best practices in software engineering, real business rules, code organization, and scalability.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages