Skip to content

leledumbo/fpcron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fpcron

Simple multiplatform interval based task scheduler.

Usage

/path/to/fpcron <check interval in milliseconds> /path/to/task/list

Compile

Requirements

The mighty Free Pascal compiler, any recent version

Command

fpc <add whatever optimizations you want here, -CX -XXs -O3 should be good for everybody> fpcron.pas

How Does It Work?

When you first feed it with a task list file, the program will remember that path. It then check the file every , reading the task list one by one.

For each task, it will be computed whether last time the task was executed + its interval in seconds <= now (milliseconds at that time). If the expression is true, the task will be executed and last execution time is updated.

After all tasks have been executed, the task list file is written back with updated last execution time.

Task List File Format

<16 digits precision floating point, denoting last execution time><space, at least one><task execution interval in seconds><space, at least one><task command>

example:

42182.2263973958324641 1 /bin/bash -c 'echo "Hello"'

About

Simple interval based task scheduler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages