Coder Social home page Coder Social logo

apptimer's People

Contributors

rkiddy avatar

Watchers

 avatar  avatar

apptimer's Issues

some tasks are repeating on too quick an interval

In my logs I am seeing that some tasks run over a dozen times a day. When I restart the app, this does not occur.

I am observing that if a task instance ends in an error, then there will be a burst of instances. A subsequent successful run will not stop the rush of task instances being run.

The scheduler should not be multiply enqueueing, because I check for isQueued and isRunning at the start of the schedule check.

For example, I see these instances.


Task                    Queued                  Started                 Ended                 Runtime Result
DailyYubPopReader 	2021-04-05 00:12:49 	2021-04-05 00:14:06 	2021-04-05 00:14:27 	20 	0 	
DailyYubPopReader 	2021-04-04 12:12:01 	2021-04-04 12:12:01 	2021-04-04 12:12:21 	20 	0 	
DailyYubPopReader 	2021-04-04 12:09:53 	2021-04-04 12:09:53 	2021-04-04 12:10:13 	20 	0 	
DailyYubPopReader 	2021-04-04 12:07:48 	2021-04-04 12:07:48 	2021-04-04 12:08:08 	20 	0 	
DailyYubPopReader 	2021-04-04 12:05:38 	2021-04-04 12:05:38 	2021-04-04 12:05:58 	20 	0 	
DailyYubPopReader 	2021-04-04 12:03:29 	2021-04-04 12:03:29 	2021-04-04 12:03:49 	19 	0 	
DailyYubPopReader 	2021-04-04 12:01:25 	2021-04-04 12:01:25 	2021-04-04 12:01:45 	19 	0 	
DailyYubPopReader 	2021-04-04 12:00:25 	2021-04-04 12:00:25 	2021-04-04 12:00:45 	20 	0 	
DailyYubPopReader 	2021-04-04 11:59:13 	2021-04-04 11:59:13 	2021-04-04 11:59:33 	20 	0 	
DailyYubPopReader 	2021-04-04 11:57:48 	2021-04-04 11:57:48 	2021-04-04 11:58:21 	32 	2 	no such element
DailyYubPopReader 	2021-04-04 11:56:35 	2021-04-04 11:56:35 	2021-04-04 11:56:55 	20 	0 	
DailyYubPopReader 	2021-04-04 11:55:18 	2021-04-04 11:55:18 	2021-04-04 11:55:38 	19 	0 	
DailyYubPopReader 	2021-04-04 11:54:15 	2021-04-04 11:54:15 	2021-04-04 11:54:36 	20 	0 	
DailyYubPopReader 	2021-04-04 11:53:15 	2021-04-04 11:53:15 	2021-04-04 11:53:36 	21 	0 	
DailyYubPopReader 	2021-04-04 11:52:28 	2021-04-04 11:52:28 	2021-04-04 11:52:49 	20 	0 	
DailyYubPopReader 	2021-04-04 11:00:44 	2021-04-04 11:46:33 	2021-04-04 12:12:21 	1547 	0 	
DailyYubPopReader 	2021-04-03 22:58:40 	2021-04-03 23:00:05 	2021-04-03 23:00:26 	21 	0 	
DailyYubPopReader 	2021-04-03 22:55:00 	2021-04-03 22:57:10 	2021-04-03 22:58:07 	57 	2 	no such element
DailyYubPopReader 	2021-04-03 10:51:05 	2021-04-03 10:53:45 	2021-04-03 10:54:12 	26 	0 	
DailyYubPopReader 	2021-04-02 22:49:55 	2021-04-02 22:50:18 	2021-04-02 22:50:35 	16 	0 	

how should scheduling respond to a failed job?

Right now, the scheduling just says "what is the time elapsed since the last successful run?" But this means that if a job fails, it will try to run again with every scheduling interval. Is this what is desired?

Should there also be a "failure schedule" defined? This would be a separate column in the app_tasks table. It would, I think, think take values like "TRY_HOURLY", "TRY_HOURS_2, or "TRY_MINUTES_15".

repeated failures should warn and stop repeating

For example, something is going wrong in my pdf processing on dailyjail and the jobs are repeating over and over again.

If a job repeats more than some number of times, it should deactivate itself and send me a warning.

should be able to abort running jobs

I cannot do this now. I will need to be able to either identify the thread running the task and kill it, or I need the Future object that the submit() method of the Executor provided, which I can use to kill the task.

I need the ability to track the Future objects for other reasons, so that will probably be best.

should this use cron4j instead of my own custom scheduling scheme?

Perhaps, but my scheduler does something different.

The cron4j framework allows one to schedule jobs with cron-like schedule strings, such as "16 14 * * *", which will run something at 4:16 pm every day. And there are lots of options for smart ways to specify various scheduling concepts.

But it does say "run my thing at this or that time or times" and what I wanted was "run my thing after this long a duration".

Is it better to say "I want this to run at 10 am and 10 pm", or it is better to say "I want this to run every 12 hours"? I am not sure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.