Windows service-based planned task control method and apparatus, and storage medium

A technology for planning tasks and management and control, applied in the direction of multi-program device, calculation, program control design, etc., can solve the problems of inability to perform high-frequency operations, increase development costs, and high degree of business coupling, so as to facilitate the traceability of historical data and reduce errors Opportunities, the effect of improving execution efficiency

Active Publication Date: 2018-03-13
TIANJIN TONGYANG TECH DEV
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The current application systems all have the requirement of planning tasks, but most of them are processed individually by the system internally for specific businesses, and the execution frequency can be controlled according to actual needs, but the coupling with the business is too high, resulting in a large number of repeated operations and wasting labor costs , and cannot make global control over all planned tasks
[0010] Part of it is processed by the windows task plan, so it is ne

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Windows service-based planned task control method and apparatus, and storage medium
  • Windows service-based planned task control method and apparatus, and storage medium
  • Windows service-based planned task control method and apparatus, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0093] Calculate Air Quality Index AQI

[0094] In an environmental monitoring system, at each monitoring site, various air parameter values ​​of different parameters are uploaded to the database data table every minute, and the system needs to calculate AQI reports based on various air parameters. According to user needs, the system needs to calculate AQI hourly report and AQI daily report.

[0095] First create two threads, the hourly thread and the daily thread, which are used to calculate the two reports respectively. The hourly thread is executed at 05 minutes every hour, and the AQI data of the previous hour is calculated according to the concentration value of the parameters involved in the AQI calculation in the hourly data table and an AQI hourly report is generated; The concentration value of the calculated parameter calculates the AQI data of the previous day and generates the AQI daily report. After the report is generated, wait for the execution interval and the...

Embodiment 2

[0098] Disconnected alarm

[0099] In an environmental quality monitoring system, it is composed of multiple environmental monitoring stations. When a certain parameter of a certain station does not receive data for a continuous period of time, it is considered to be offline, and then a disconnection alarm record is generated and pushed to designated personnel.

[0100] The system adopts SQLServer database, uses ASP.net platform for program development, and the background service is written by C# language. Circularly read the minute data mean value of each parameter of each station in the minute data table, if the concentration mean value of the parameter at the station is not monitored within a continuous period of time (configurable), it is considered that the station has an alarm for the parameter, and then an alarm is generated Record, if the current time is within the sending time period (configurable), the alarm record will be sent to the designated person.

[0101]For...

Embodiment 3

[0104] Report calculation

[0105] In an environmental monitoring system, the environmental monitoring equipment is controlled remotely, and then the equipment operates according to the control instructions, and the collected data is transferred to the database. Now these data need to be calculated according to certain rules to generate their own reports, which can be used Do the following:

[0106] Create three threads for generating three reports respectively;

[0107] Set its start execution time and execution interval for each thread, store this information in the database, and start executing corresponding tasks at each execution time, for example, set a thread to execute at the third minute of every ten minutes, The second thread is set to be executed at the 4th minute of every ten minutes, and the third thread is set to be executed at the 5th minute of every ten minutes. Then one thread will be executed at the 3rd, 13th, 23rd, 33rd, 43rd, and 53rd minute of each hour. ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a windows service-based planned task control method and apparatus, and a storage medium. According to the planned task control method, a thread is established for a to-be-executed planned task by a corresponding delegation method; the thread is executed in a thread blockage mode; further the planned task can be configured as multiple jobs; corresponding threads are created;and a thread environment is managed in a loosely coupled thread pool management mode, so that the executive efficiency of repeated or complicated work can be greatly improved.

Description

technical field [0001] The present invention relates to the automatic processing of tasks, and more specifically to a method, device and computer-readable storage medium for planning task management and control based on windows services. Background technique [0002] In a practical application scenario, not every job is required to be executed immediately, so the job can be scheduled to be executed sometime in the future. [0003] For example, a sysadmin might have a list of tasks to perform each night: [0004] 21:00PM: Run the upload task of the information file [0005] · 22:30PM: Operational data report generation [0006] 23:59PM: Back up the database [0007] Then the system administrator only needs to do three steps of operation every night, but the interval between each step is too long, which undoubtedly wastes manpower. Therefore, the automated processing method, that is, the scheduled task, came into being. A scheduled task usually refers to a task that runs ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/48G06F11/07
CPCG06F9/485G06F11/0715G06F11/0751G06F11/0766G06F2209/481G06F2209/483
Inventor 陈文亮李亚楠张鑫袁星星许金韬
Owner TIANJIN TONGYANG TECH DEV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products