CN110221906A - A kind of method and system of Asp.Net run timing task - Google Patents
A kind of method and system of Asp.Net run timing task Download PDFInfo
- Publication number
- CN110221906A CN110221906A CN201910437276.9A CN201910437276A CN110221906A CN 110221906 A CN110221906 A CN 110221906A CN 201910437276 A CN201910437276 A CN 201910437276A CN 110221906 A CN110221906 A CN 110221906A
- Authority
- CN
- China
- Prior art keywords
- task
- module
- application program
- main control
- timed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000012545 processing Methods 0.000 claims abstract description 40
- 238000001514 detection method Methods 0.000 claims abstract description 30
- 238000003672 processing method Methods 0.000 claims abstract description 9
- 230000004913 activation Effects 0.000 claims abstract description 8
- 230000008569 process Effects 0.000 claims abstract description 8
- 230000005856 abnormality Effects 0.000 claims description 11
- 238000007599 discharging Methods 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
- G06F9/4825—Interrupt from clock, e.g. time of day
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention belongs to the digital calculating equipments or data processing equipment or data processing method technical field especially suitable for specific function, a kind of method and system of Asp.Net run timing task is disclosed, the method for the Asp.Net run timing task specifically includes: the condition that user's custom task processing method, task trigger condition and task terminate;Application program status is detected and fed back, and corresponding task processing is carried out according to application program status, and whether Detection task processing is normal in task processes;Task list is automatically updated according to the disposition of task;All task situations for being currently running and waiting operation are automatically stored.System provided by the invention can run multinomial timed task simultaneously, while can be automatically with the operation conditions of new task, and multithreading cooperating syringe has exception handling ability;The activation that can carry out application program in application program suspend mode simultaneously, avoids thread and is destroyed by system.
Description
Technical field
The invention belongs to especially suitable for specific function digital calculating equipment or data processing equipment or data processing side
Law technology field more particularly to a kind of method and system of Asp.Net run timing task.
Background technique
Currently, the prior art commonly used in the trade is such that
There is no the systems of dedicated run timing task in the prior art, usually by being embedded in timer in a program
It solves the problem of that timed task not can solve multinomial timed task while running when insertion timer, is embedded in simultaneously
After timer, if application program is not at operating status, system may discharge all related resources, when application program is transported again
After row, can not also corresponding timed task be being carried out
In conclusion problem of the existing technology is:
(1) prior art can not carry out multinomial timed task simultaneously;
(2) timed task fluctuation of service may be destroyed in suspend mode by system.
Summary of the invention
In view of the problems of the existing technology, the present invention provides a kind of method of Asp.Net run timing task and it is
System.
The invention is realized in this way a kind of method and system of Asp.Net run timing task, the Asp.Net fortune
The system of row timed task specifically includes:
Task custom block, detection module, trigger module, timed task processing module, main control module, task list pipe
Manage module, application program active module, abnormality detection module, ending module, memory module;
Task custom block: connecting with main control module, for custom task processing method, task trigger condition and
Task termination condition;
Whether whether detection module: connecting with main control module, start and terminate for detecting application program;
Trigger module: connecting with main control module, reaches customized trigger condition, task termination condition Shi Xiangzhu for working as
It controls module and issues signal;
Timed task processing module: connecting with main control module, for carrying out task according to customized timed task method
Processing;
Main control module: with task custom block, detection module, trigger module, timed task processing module, task list
Management module, application program active module, abnormality detection module, ending module and memory module connection;For carrying out task
Scheduling, and control modules normal work;
Task list management module: connecting with main control module, for managing timed task list;
Application program active module: connecting with main control module, for when application program terminates operation, when not up to task
The activation of application program is carried out when termination condition;
Whether abnormality detection module: connecting with main control module, handle for Detection task normal;
Ending module: connecting with main control module, for discharging all related to the task when reaching task termination condition
Resource;
Memory module: connecting with main control module, for storing the task situation for being currently running and waiting operation.
Further, the method for the Asp.Net run timing task specifically includes:
Step 1, the condition that user's custom task processing method, task trigger condition and task terminate;
Step 2 detects and feeds back application program status, and appointed accordingly according to application program status
Business processing, and whether Detection task processing is normal in task processes;
Step 3 automatically updates task list according to the disposition of task;It is automatically stored and all are currently running and wait
Task situation to be run.
Further, described to be specifically included according to the progress corresponding task processing of application program status in step 2:
(1) when application program does not bring into operation not also in state is terminated, then any operation is not done;
(2) when application program brings into operation, then judge whether to have reached customized task trigger condition;If reaching touching
Clockwork spring part is then timed task processing;Any operation is not done then if customized task trigger condition is reached;
(3) when application program terminates operation, then judge whether to have reached task termination condition;If having reached task terminates
Condition then discharges all resources relevant to the project;If not up to task termination condition, carries out the activation of application program.
Further, the timed task processing specifically includes:
(1) the current time is obtained;
(2) it obtains untreated timed task list and timed task handles the time;
(3) corresponding position is carried out according to customized treatment process when current time is equal with the timed task processing time
Reason.
In conclusion advantages of the present invention and good effect are as follows:
System provided by the invention can run multinomial timed task simultaneously, while can be automatically with the operation shape of new task
Condition, multithreading cooperating syringe, has exception handling ability;Swashing for application program can be carried out in application program suspend mode simultaneously
It is living, it avoids thread and is destroyed by system, while user can customize timed task, it is convenient and efficient and have universality;Work as task
After, system can discharge all resources automatically, save memory space, ensure that the efficiency and space utilization of system operation
Rate.
Detailed description of the invention
Fig. 1 is the system structure diagram of Asp.Net run timing task provided in an embodiment of the present invention.
Fig. 2 is the method flow diagram of Asp.Net run timing task provided in an embodiment of the present invention.
In figure: 1, task custom block;2, detection module;3, trigger module;4, timed task processing module;5, master control
Module;6, task list management module;7, application program active module;8, abnormality detection module;9, ending module;10, it stores
Module.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to embodiments, to the present invention
It is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to
Limit the present invention.
Application principle of the invention is described in detail with reference to the accompanying drawing.
As shown in Figure 1, the system of Asp.Net run timing task provided in an embodiment of the present invention specifically includes:
Task custom block 1, detection module 2, trigger module 3, timed task processing module 4, main control module 5, task
List management module 6, application program active module 7, abnormality detection module 8, ending module 9, memory module 10;
Task custom block 1: connecting with main control module 5, for custom task processing method, task trigger condition with
And task termination condition;
Whether whether detection module 2: connecting with main control module 5, start and terminate for detecting application program;
Trigger module 3: connecting with main control module 5, for when reaching customized trigger condition, task termination condition to
Main control module issues signal;
Timed task processing module 4: connecting with main control module 5, for being appointed according to customized timed task method
Business processing;
Main control module 5: with task custom block 1, detection module 2, trigger module 3, timed task processing module 4, appoint
List management module 6, application program active module 7, abnormality detection module 8, ending module 9 and the memory module 10 of being engaged in connect;
For carrying out the scheduling of task, and control modules normal work;
Task list management module 6: connecting with main control module 5, for managing timed task list;
Application program active module 7: connecting with main control module 5, for appointing when being not up to when application program terminates operation
It is engaged in carrying out the activation of application program when termination condition;
Whether abnormality detection module 8: connecting with main control module 5, handle for Detection task normal;
Ending module 9: connecting with main control module 5, for when reaching task termination condition, release and all phases of the task
The resource of pass;
Memory module 10: connecting with main control module 5, for storing the task situation for being currently running and waiting operation.
As shown in Fig. 2, the method for Asp.Net run timing task provided in an embodiment of the present invention specifically includes:
S101, the condition that user's custom task processing method, task trigger condition and task terminate;
S102 detects and feeds back application program status, and carries out corresponding task according to application program status
Processing, and whether Detection task processing is normal in task processes;
S103 automatically updates task list according to the disposition of task;It is automatically stored and all are currently running and wait
The task situation of operation.
It is provided in an embodiment of the present invention that corresponding task processing is carried out specifically according to application program status in step S102
Include:
(1) when application program does not bring into operation not also in state is terminated, then any operation is not done;
(2) when application program brings into operation, then judge whether to have reached customized task trigger condition;If reaching touching
Clockwork spring part is then timed task processing;Any operation is not done then if customized task trigger condition is reached;
(3) when application program terminates operation, then judge whether to have reached task termination condition;If having reached task terminates
Condition then discharges all resources relevant to the project;If not up to task termination condition, carries out the activation of application program.
Timed task processing provided in an embodiment of the present invention specifically includes:
(1) the current time is obtained;
(2) it obtains untreated timed task list and timed task handles the time;
(3) corresponding position is carried out according to customized treatment process when current time is equal with the timed task processing time
Reason.
Working principle of the present invention is as follows:
User is timed task processing method, task trigger condition and termination condition by task custom block 1
It is customized;Detection module 2 detects application program state in which, and gives application program status Real-time Feedback to master control mould
Block 5;When application program is in the state of not running, any operation is not done;After application program brings into operation, then main control module
The untreated task list of 5 traversal task list management modules 6, and successively control trigger module 3 and detect whether to have reached and do not locate
The trigger condition of the task processing of each task in reason task, when reaching trigger condition, trigger module 3 is fed back to main control module 5
Signal, main control module 5, which controls timed task processing module 4 and is timed according to the customized timed task treatment process of user, appoints
The processing of business;Whether normal main control module 5 controls the processing of 8 Detection task of abnormality detection module simultaneously;When task after treatment,
5 control task list management module 6 of main control module carries out the update of task list, while main control module 5 transfers trigger mode again
Block 3 judges whether the task has reached termination condition, and when reaching termination condition, then main control module 5 controls ending module 9 and discharges
All resources relevant to the task, if not up to termination condition, main control module 5 control application program active module 7 every
A period of time carries out the activation of application program, until the task reaches termination condition and terminates;Memory module 10 is all for storing
With the processing information and all relevant informations of ongoing task and untreated task.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.
Claims (4)
1. a kind of method and system of Asp.Net run timing task, which is characterized in that the Asp.Net run timing task
System specifically include:
Task custom block, detection module, trigger module, timed task processing module, main control module, task list manage mould
Block, application program active module, abnormality detection module, ending module, memory module;
Task custom block: connecting with main control module, is used for custom task processing method, task trigger condition and task
Termination condition;
Whether whether detection module: connecting with main control module, start and terminate for detecting application program;
Trigger module: connecting with main control module, for when reaching customized trigger condition, task termination condition to master control mould
Block issues signal;
Timed task processing module: connecting with main control module, for carrying out task processing according to customized timed task method;
Main control module: with task custom block, detection module, trigger module, timed task processing module, task list management
Module, application program active module, abnormality detection module, ending module and memory module connection;For carrying out the tune of task
Degree, and control modules normal work;
Task list management module: connecting with main control module, for managing timed task list;
Application program active module: connecting with main control module, for application program terminate operation when, when not up to task terminates
The activation of application program is carried out when condition;
Whether abnormality detection module: connecting with main control module, handle for Detection task normal;
Ending module: connecting with main control module, for discharging and all relevant moneys of the task when reaching task termination condition
Source;
Memory module: connecting with main control module, for storing the task situation for being currently running and waiting operation.
2. the method and system of Asp.Net run timing task as described in claim 1, which is characterized in that the Asp.Net fortune
The method of row timed task specifically includes:
Step 1, the condition that user's custom task processing method, task trigger condition and task terminate;
Step 2 detects and feeds back application program status, and carried out at corresponding task according to application program status
Reason, and whether Detection task processing is normal in task processes;
Step 3 automatically updates task list according to the disposition of task;Be automatically stored it is all be currently running and wait it is to be shipped
Capable task situation.
3. the method and system of Asp.Net run timing task as claimed in claim 2, which is characterized in that described in step 2
Corresponding task processing is carried out according to application program status to specifically include:
(1) when application program does not bring into operation not also in state is terminated, then any operation is not done;
(2) when application program brings into operation, then judge whether to have reached customized task trigger condition;If reaching triggering item
Part is then timed task processing;Any operation is not done then if customized task trigger condition is reached;
(3) when application program terminates operation, then judge whether to have reached task termination condition;If having reached task termination condition
Then discharge all resources relevant to the project;If not up to task termination condition, carries out the activation of application program.
4. the method and system of Asp.Net run timing task as claimed in claim 2, which is characterized in that the timed task
Processing specifically includes:
(1) the current time is obtained;
(2) it obtains untreated timed task list and timed task handles the time;
(3) respective handling is carried out according to customized treatment process when current time is equal with the timed task processing time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910437276.9A CN110221906A (en) | 2019-05-24 | 2019-05-24 | A kind of method and system of Asp.Net run timing task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910437276.9A CN110221906A (en) | 2019-05-24 | 2019-05-24 | A kind of method and system of Asp.Net run timing task |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110221906A true CN110221906A (en) | 2019-09-10 |
Family
ID=67818133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910437276.9A Pending CN110221906A (en) | 2019-05-24 | 2019-05-24 | A kind of method and system of Asp.Net run timing task |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110221906A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104516745A (en) * | 2013-09-27 | 2015-04-15 | 北京新媒传信科技有限公司 | Method and system for running timing task |
US20180081720A1 (en) * | 2016-09-18 | 2018-03-22 | Esg Elektroniksystem- Und Logistik-Gmbh | Method and apparatus for executing real-time tasks |
CN109298962A (en) * | 2018-09-03 | 2019-02-01 | 中国平安人寿保险股份有限公司 | Monitoring method, computer readable storage medium and the terminal device of timed task |
CN109636175A (en) * | 2018-12-07 | 2019-04-16 | 上海上实龙创智慧能源科技股份有限公司 | A kind of automatic processing method of business system timed task |
-
2019
- 2019-05-24 CN CN201910437276.9A patent/CN110221906A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104516745A (en) * | 2013-09-27 | 2015-04-15 | 北京新媒传信科技有限公司 | Method and system for running timing task |
US20180081720A1 (en) * | 2016-09-18 | 2018-03-22 | Esg Elektroniksystem- Und Logistik-Gmbh | Method and apparatus for executing real-time tasks |
CN109298962A (en) * | 2018-09-03 | 2019-02-01 | 中国平安人寿保险股份有限公司 | Monitoring method, computer readable storage medium and the terminal device of timed task |
CN109636175A (en) * | 2018-12-07 | 2019-04-16 | 上海上实龙创智慧能源科技股份有限公司 | A kind of automatic processing method of business system timed task |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107291547B (en) | Task scheduling processing method, device and system | |
CN102473122B (en) | fault-tolerant batch processing | |
CN106293919B (en) | A kind of the built-in tasks dispatching device and method of time trigger | |
CN108762931A (en) | Method for scheduling task, server based on distributed scheduling system and storage medium | |
CN103744723A (en) | Thread pool managing method and system | |
CN108027751A (en) | Efficient scheduling to multi version task | |
CN110018893A (en) | A kind of method for scheduling task and relevant device based on data processing | |
EP2357559A1 (en) | Performing a workflow having a set of dependancy-related predefined activities on a plurality of task servers | |
CN105468450A (en) | Task scheduling method and system | |
CN103365708A (en) | Method and device for scheduling tasks | |
CN111949386A (en) | Task scheduling method, system, computing device and readable storage medium | |
CN108563493A (en) | A kind of event-driven method, device, equipment and readable storage medium storing program for executing | |
CN107491346A (en) | A kind of task processing method of application, apparatus and system | |
CN105630588A (en) | Distributed job scheduling method and system | |
CN107168779A (en) | A kind of task management method and system | |
CN109582486A (en) | A kind of house dog monitoring method, system and equipment and storage medium | |
CN105138598B (en) | The method and system of remote timing task | |
CN110611707A (en) | Task scheduling method and device | |
CN106062716B (en) | The method, apparatus and single task system of multitask are realized in single task system | |
CN110751458B (en) | Business approval method, device and system | |
CN107168789A (en) | The serial scheduling method and device of multitask | |
CN109471711A (en) | A kind of method and device of task processing | |
CN102521530A (en) | License recycling method and system | |
CN103631594A (en) | Asynchronous scheduling method and asynchronous scheduling system for general flow | |
US7418506B1 (en) | Apparatus for connection management and the method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190910 |
|
RJ01 | Rejection of invention patent application after publication |