magic.lambda.scheduler
This project gives you the ability to create persisted and scheduled Hyperlambda tasks for Magic. More specifically it provides the following slots.
- [tasks.create] - Creates a new task
- [tasks.get] - Returns an existing task
- [tasks.list] - Lists all tasks
- [tasks.update] - Updates an existing task
- [tasks.count] - Counts tasks in system
- [tasks.execute] - Executes an existing task
- [tasks.delete] - Deletes a task
- [tasks.schedule] - Schedules an existing task
- [tasks.schedule.delete] - Deletes an existing schedule
- [tasks.scheduler.start] - Starts the task scheduler
How Hyperlambda tasks are stored
All tasks are persisted into your magic database, either in MySQL, SQLite, PostgreSQL, or Microsoft SQL Server.
This implies that even if your server is stopped, all scheduled tasks and persisted tasks will automatically
load up again, and be available and re-scheduled as the server is restarted. This might imply that
all tasks in the past are immediately executed, which is important for you to understand, since any tasks
with a due date in the past, are executed immediately as the server restarts again.
Tasks are by default persisted into your tasks table, and schedules are persisted into your
task_due table.
How to use Hyperlambda tasks as business process workflows
Hyperlambda tasks allows you to persist a “function invocation” for later to execute it, once some specific condition occurs - Effectively giving you the most important features from Microsoft Workflow Foundation, without the ridiculous XML and WYSIWYG features - In addition to that this also is a .Net Core library, contrary to MWF that only works for the full .Net Framework. The Hyperlambda task scheduler is also probably at least somewhere between 200 and 400 times faster than MWF, due to not using reflection during execution.