BlazingQuartz is an easy to use Blazor web UI to manage Quartz.NET scheduler jobs.
BlazingQuartz is created with ASP.NET Core Blazor Server and use MudBlazor component library.
- .NET 6
- Quartz 3.5+
- Add, modify jobs and triggers
- Support Cron, Daily, Simple trigger
- Pause, resume, clone scheduled jobs
- Create custom UI to configure job
- Dynamic variables support
- Monitor currently executing jobs
- Load custom job DLLs through configuration
- Display job execution logs, state, return message and error message
- Filter execution logs
- Store execution logs into any database
- Build-in support for SQLite, MSSQL and PostgreSQL
- Auto cleanup of old execution logs
- Configurable logs retention days
- Build-in Jobs
- HTTP API client job
-
Create the following folders:
- <blazingquartz_path>
- <blazingquartz_path>/logs
- <blazingquartz_path>/certs
-
Copy BlazingQuartzDb.db to <blazingquartz_path>
-
Run below docker command:
docker run -d \ --name=BlazingQuartzApp \ -e TZ=<your_timezone> -v /<blazingquartz_path>/BlazingQuartzDb.db:/app/BlazingQuartzDb.db \ -v /<blazingquartz_path>/logs:/app/logs \ -v /<blazingquartz_path>/certs:/app/certs \ -p 9090:80 \ wilchn/blazingquartzapp:latestNote: Replace the following:
<blazingquartz_path><your_timezone>- See list of acceptable values. Ex. Asia/Singapore
-
Navigate to http://localhost:9090
To support https, you will need SSL certificate. Put the SSL certificate file to <blazingquartz_path>/certs.
Then add the following lines to appsettings.json:
"Kestrel": {
"Certificates": {
"Default": {
"Path": "certs/<your_ssl_cert>.pfx",
"Password": ""
}
}
}NOTE: Replace <your_ssl_cert>
Configure the docker container to use the https port. Ex. https on 9091
docker run -d \
...
-p 9090:80 \
-p 9091:443 \
-e ASPNETCORE_URLS='https://+;http://+' \
-e ASPNETCORE_HTTPS_PORT=9091 \
wilchn/blazingquartzapp:latest
Below steps shows you how to use PostgreSQL database to store execution logs.
NOTE: Below steps assume that you already created the database and have imported the DB tables used by Quartz. For more info, refer to configure ADO.NET JobStore.
-
Copy appsettings.json to <blazingquartz_path>
-
Modify appsettings.json From
"ConnectionStrings": { "BlazingQuartzDb": "DataSource=BlazingQuartzDb.db;Cache=Shared" }, "Quartz": { ... "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.SQLiteDelegate, Quartz", ... "quartz.dataSource.myDS.provider": "SQLite-Microsoft" }, "BlazingQuartz": { "DataStoreProvider": "Sqlite",To
"ConnectionStrings": { "BlazingQuartzDb": "Host=<db_host>;Port=5432;Database=<db_name>;Username=<db_user>;Password=<db_password>" }, "Quartz": { ... "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.PostgreSQLDelegate, Quartz", ... "quartz.dataSource.myDS.provider": "Npgsql" }, "BlazingQuartz": { "DataStoreProvider": "PostgreSQL",NOTE: Replace below with actual database value:
- <db_host>
- <db_name>
- <db_user>
- <db_password>
To use MSSQL, change DataStoreProvider to
SqlServerand update the connection string. -
Configure the docker container to mount appsettings.json volume. Example docker command:
docker run -d \ --name=BlazingQuartzApp \ -e TZ=<your_timezone> -v /<blazingquartz_path>/appsettings.json:/app/appsettings.json \ -v /<blazingquartz_path>/logs:/app/logs \ -v /<blazingquartz_path>/certs:/app/certs \ -p 9090:80 \ wilchn/blazingquartzapp:latestNOTE: Replace <blazingquartz_path> and <your_timezone>
Dynamic variables provide pre-defined set of variables that can be used when assigning value to JobDataMap. Their values are generated at the time of job execution. Any JobDataMap field that support DataMapValueType.InterpolatedString can use dynamic variable in format {{$variable}}. For example, "list/{{$datetime 'yyyy-mm-dd'}}" will be replaced to "list/2022-09-26" during job execution.
Below are list of pre-defined variables. Note that variable names are case-sensitive.
{{$guid}}- Replace it with a RFC 4122 v4 UUID{{$datetime rfc1123|iso8601|"custom format"|'custom format' [offset unit]}}- Replace it with a UTC datetime string in either ISO8601, RFC1123 or a custom display format. You can also specify an offset relative to current date time. For example,{{datetime iso8601 -1 d}}to represent one day ago.{{$localDatetime rfc1123|iso8601|"custom format"|'custom format' [offset unit]}}- Similar to$datetimeexcept it returns local date time.
$datetime and $localDatetime supports below offset units:
| Unit | Description |
|---|---|
| y | Year |
| M | Month |
| d | Day |
| h | Hour |
| m | Minute |
| s | Second |
| ms | Millisecond |
