scheduling

scheduling tasks on JBoss with clustering

I need to be able to run some scheduled tasks (reports) for an EJB application running on JBoss 4.2. In my initial implementation I am using a servlet in an associated WAR to read some configuration from a properties file and then reset the scheduled tasks using the Timer Service API. This works but it seems a bit awkward to have the...

Run a powershell script in the background once per minute

I want a powershell script to be run once per minute in the background. No window may appear. How do I do it? ...

Quartz trigger start time before current time

Lets say that I have a quartz trigger SimpleTrigger that fires every second and start time is set to 12:00:00 today. It seems that when I schedule that trigger at 12:00:10 then it fires immediately 10 times. Is there a way to avoid that kind of behaviour or should I just manually set start time to 12:00:10 before scheduling? ...

How to spread processes over time getting minimum number of "collisions"

I'm developing a scheduler for an embedded system. This scheduler will call each process every X milliseconds; this time can be configured separately for each process, of course. Everything is coded and calls every process as it should; the problem I'm facing is this: Imagine I set 4 processes to be called every 10, 15, 5 and 30 millis...

Scheduling algorithm

Let's say I can configure some recurring job. For example, I want a certain job to be executed every 4 days starting from a start date and ending at an enddate or it can even never end. you could have different scheduling configuration, montly, weekly, daily, you can even have daily recurrence like every 2h from 2pm to 11pm. I'm look...

scheduling runnable tasks in java

I am following up an interesting question on so, on usage of ScheduledThreadPoolExecutor for some repeating task. Scheduling this object returns a ScheduledFuture object which one can use to cancel the next run of the task. One thing to note here is the task itself is completely decoupled from the schedule-- ScheduledExecutorService...

How Create a Scheduler (e.g. to schedule tweets, or an api request)

I have a table of schedule items, they may be scheduled for the same time. I'm wondering how to have them all execute at the correct time when: The problem I see is that executing one scheduled item (like a scheduled twitter post) requires an API request which may take up to a second or two - probably longer. If I execute them sequentia...

Design for VB.NET scheduler application

I wish to develop an application in VB.NET to provide to following functionality and hope you can give me some pointers on which direction to take. I need some kind of “server” type component which sits in the background monitoring request from users and performing various task. (this component can be install locally or centrally) The u...

Scheduling of tasks to a single resource using Prolog

I searched through here as best I could and though I found some relevant questions, I don't think they covered the question at hand: Assume a single resource and a known list of requests to schedule a task. Each request includes a start_after, start_by, expected_duration, and action. The goal is to schedule the tasks for execution as s...

What is the context switching time ?

I have a doubt in context switching. In multi threading, when the context switching occurs, what will be the time between two context switches? Is it fixed time interval? ...

Extending a Prolog goal through recursion?

I've implemented (finally) a few goals that will schedule a series of tasks according to a startBy startAfter and duration. The schedule goal however, accepts only the prescribed number of tasks. I'd like to extend the functionality of the schedule goal to accept a single list and iterate through that list while scheduling. unfortunatel...

Are all scheduling problems NP-Hard?

I know there are some scheduling problems out there that are NP-hard/NP-complete ... however, none of them are stated in such a way to show this situation is also NP. If you have a set of tasks constrained to a startAfter, startBy, and duration all trying to use a single resource ... can you resolve a schedule or identify that it cannot...

How to schedule an action in java?

Hi! I'm developing an application which requires Contents of the database to be written to an ms-excel file at the end of each day. I've written the code for copying the contents into ms-excel file but Now how to proceed further? Whether threads are to be used to check for the completion of 24 hours or there's some other mechanism? Plea...

Cron syntax with Java EE 5?

Timer Tasks in Java EE are not very comfortable. Is there any util, to configure timer with cron syntax like "0 20 20 * * "? I wonder, if it would be a good way to use Quartzinside (clustered) JEE application. According to http://www.prozesse-und-systeme.de/serverClustering.html (german page) there limits with Quartz and Java EE cluster...

Fine-Grain Timing in WebOS

I'm looking to build a program that works within soft real-time schedules; to do this, I need to generate a timing event at an interval significantly less than a second. Is there an API that exposes fine-grain timers in WebOS? ...

how to do background computing in Spring 3.0?

In a spring application I want do some background computing. The task is that I save an entity( lets say a GPS coordinate) and then I want to query a web service to get distance between all the coordinates and store them in the db for later use. There is a possibility that after storing the entity, connection cannot be made to the web se...

Java thread affinity

Does anybody know of a way to lock down individual threads within a Java process to specific CPU cores (on Linux)? I've done this in C, but can't find how to do this in Java. My instincts are that this will require a JNI call, but I was hoping someone here might have some insight or might have done it before. Thanks! ...

Who schedules the scheduler in OS - Isn't it a chicken and egg scenario?

Who schedules the scheduler? Which is the first task created and how is this first task created? Isn't any resource or memory required for it? isn't like a chicken and egg scenario? Isn't scheduler a task? Does it get the CPU at the end of each time slice to check which task needs to be given CPU? Are there any good links which makes...

multilevel feedback queue scheduling

I am looking for a sample code for MLFQ scheduler in c. I'd appreciate if someone can help me. ...

Linux kernel: the cost of immediate descheduling.

Hello From the http://lkml.indiana.edu/hypermail/linux/kernel/0103.1/0030.html I learn about a new type of mutexes in linux, an adaptive_np one: The PTHRED_MUTEX_ADAPTIVE_NP is a new mutex that is intended for high throughput at the sacrifice of fairness and even CPU cycles. This mutex does not transfer ownership to a wa...