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.
Create the following folders:
Copy BlazingQuartzDb.db to
Run below docker command:
docker run -d \
--name=BlazingQuartzApp \
-e TZ=<your_timezone> \
-e ASPNETCORE_HTTP_PORTS=8080 \
-v /<blazingquartz_path>/BlazingQuartzDb.db:/app/BlazingQuartzDb.db \
-v /<blazingquartz_path>/logs:/app/logs \
-v /<blazingquartz_path>/certs:/app/certs \
-p 9090:8080 \
wilchn/blazingquartzapp:latest
Note: 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
Configure the docker container to use the https port. Ex. https on 9091
docker run -d \
...
-p 9090:8080 \
-p 9091:8081 \
-e ASPNETCORE_HTTPS_PORTS=8081 \
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.
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:
To use MSSQL, change DataStoreProvider to SqlServer
and update the connection string.
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:latest
NOTE: Replace
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 $datetime
except 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 |
Refer to upgrading page to see if any additional steps require to upgrade to newer version.