ScheduleMaster is an open source distributed task scheduling system. It is built on the .NET Core 3.1 platform and supports cross-platform multi-node deployment and operation.
ASP.NET Core3.1, EntityFramework Core3.0, Mysql5.7, Quartz.Net, BeyondAdmin, Jquery...
Before using, please prepare the required environment:
Visual Studio 2019,.NET Core3.1 SDK,Mysql 5.7(可选),SQLServer(可选),PostgreSQL(可选),Centos(可选),Docker(可选).
The following is an example of using Mysql as a database and launching it in configuration file . For other methods, refer to the detailed documentation.
Download the source code locally, then open the solution with VS2019 and compile it through.
Open the appsettings.json file in the root directory of the project Hos.ScheduleMaster.Web, first modify the Mysql database connection string to ensure normal database access, then find the NodeSetting node, modify IP field to the IP address that the master will deploy (the master port is 30,000 and does not need to be modified), right-click on the project and select Publish... to publish to the local folder.
Open the appsettings.json file in the root directory of the project Hos.ScheduleMaster.QuartzHost, first modify the Mysql connection string, then find the NodeSetting node, set the name of the worker IdentityName , modify IP field to the IP address to be deployed, and Port field to the address to be listened to (recommended to be 30001), right-click on the project and select Publish..., and publish to the local folder. If you want to add a new worker, just configure IdentityName、IP、Port in the same way. After the worker starts up, it will inject its own information into the database and can be seen in the master.
Quick release tips: Use powershell to execute script
publish.ps1on the Windows platform to quickly publish it tod:/sm-publishdirectory, and execute scriptsh publish.shon the Linux platform to quickly publish it to the/home/sm-publishdirectory.
Other publishing methods are also possible. Here is an example of running 2 worker nodes:
dotnet Hos.ScheduleMaster.Web.dll to start the program. The first startup will automatically migrate and generate the database structure and initialize the seed data . Open the browser and enter the ip and port to access (initial user name admin , password 111111 ).dotnet Hos.ScheduleMaster.QuartzHost.dll --urls http://*:30001 to start the program. Open the browser and enter the ip and port and you will see a welcome page, indicating that the worker has been started successfully.appsettings.json file under worker to the configuration of worker2 (skip it if it has been modified before release), and execute the command dotnet Hos.ScheduleMaster.QuartzHost.dll --urls http://*:30002 to start the program.Please make sure the machine has
.NET Core3.1runtime environment installed before running.
Copy the publishing file to Centos, and the operation steps are the same as Windows.
docker build -t ms_master . command in the master's publish directory to generate the master image, and then execute docker run -d -p 30000:30000 --name="mymaster" ms_master to run the container.docker build -t ms_worker . command in the worker publish directory to generate a worker image, and then execute docker run -d -p 30001:80 --name="myworker1" ms_worker bash --identity=docker-worker1 --ip=你的宿主机IP --port=30001 Run the container to start worker1.docker run -d -p 30002:80 --name="myworker2" ms_worker bash --identity=docker-worker2 --ip=你的宿主机IP --port=30002 Run container to start worker2.docker ps to check the running status of each container. If it cannot be run, please check the container log. QQ group: 824535095
Please feel free to pay, please note if you like it~