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.
- Tasks are loaded from
~/.smart-task-scheduler/tasks.json - Each task must define a
starttimestamp - Optional
endtimestamp defines the execution validity window - Tasks are scheduled using
ScheduledExecutorService
./mvnw clean package
java -jar target/smart-task-scheduler.jar[
{
"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
- 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)
- Tasks are not persisted after execution
- Scheduler state is lost when the JVM stops