EzDevInfo.com

schedule

Python job scheduling for humans.

EJB @Schedule wait until method completed

I want to write a back-ground job (EJB 3.1), which executes every minute. For this I use the following annotation:

@Schedule(minute = "*/1", hour = "*")

which is working fine.

However, sometimes the job may take more than one minute. In this case, the timer is still fired, causing threading-issues.

Is it somehow possible, to terminate the scheduler if the current execution is not completed?


Source: (StackOverflow)

How to create a scheduled job in SQL server 2008 via T-SQL?

I want to create a job which deletes records from a database after a period of time has passed. For example I have a field in news table Time Stamp and each month a SQL query runs like a scheduled job against my database and deletes news where the time stamp is two month old. Generally I want to delete news for 2 month ago and older to not let my table become a large table. How can I accomplish this?


Source: (StackOverflow)

Advertisements

Can the EJB 3.1 @Schedule be configured outside of the application code?

How can I configure a schedule intervals:

@Schedule(persistent=true, minute="*", second="*/5", hour="*")

outside of the application code?

  1. How can I configure it in ejb-jar.xml?
  2. Can I configure it outside the application (kind of properties file)?

Source: (StackOverflow)

How to interrupt or stop currently running quartz job?

I have some tasks that are executed with the help of Java Quartz Jobs, but I need to stop some tasks by some condition in my code. I read that this can be done via InterruptableJob. But i didn't understand in what way i should do it?


Source: (StackOverflow)

Weekly repeating tasks emacs org-mode

I want to track habits using org-mode. For example, I want to do exercise 3 times every week. Is there a way to schedule 3 times a task every week irrespective of the date in org-mode?


Source: (StackOverflow)

Scheduling R Script

I have written an R script that pulls some data from a database, performs several operations on it and post the output to a new database.

I would like this script to run every day at a specific time but I can not find any way to do this effectively.

Can anyone recommend a resource I could look at to solve this issue? I am running this script on a Windows machine.


Source: (StackOverflow)

How do I schedule a task to run at periodic intervals?

I was trying some codes to implement a scheduled task and came up with these codes .

import java.util.*;

class Task extends TimerTask {


    int count = 1;

    // run is a abstract method that defines task performed at scheduled time.
    public void run() {
        System.out.println(count+" : Mahendra Singh");
        count++;
    }
}

class TaskScheduling {

   public static void main(String[] args) {
       Timer timer = new Timer();


       // Schedule to run after every 3 second(3000 millisecond)
       timer.schedule( new Task(), 3000);   
   }
}

My output :

1  :  Mahendra Singh

I expected the compiler to print a series of Mahendra Singh at periodic interval of 3 s but despite waiting for around 15 minutes, I get only one output...How do I solve this out?


Source: (StackOverflow)

Representing complex scheduled recurrence in a database

I have an interesting problem trying to represent complex schedule data in a database. As a guideline, I need to be able to represent the entirety of what the iCalendar -- ics -- format can represent, but in a database. I'm not actually implementing anything relating to ics, but it gives a good scope of the type of rules I need to be able to model for my particular project.

I need to allow allow representation of a single event or a recurring event based on multiple times per day, days of the week, week of a month, month, year, or some combination of those. For example, the third Thursday in November annually, or the 25th of December annually, or every two weeks starting November 2 and continuing until September 8 the following year.

I don't care about insertion efficiency but query efficiency is critical. The operation I will be doing most often is providing either a single date/time or a date/time range, and trying to determine if the defined schedule matches any part of the date/time range. Other operations can be slower. For example, given January 15, 2010 at 10:00 AM through January 15, 2010 at 11:00 AM, find all schedules that match at least part of that time. (i.e. a schedule that covers 10:30 - 11:00 still matches.)

Any suggestions? I looked at http://stackoverflow.com/questions/1016170/how-would-one-represent-scheduled-events-in-an-rdbms but it doesn't cover the scope of the type of recurrence rules I'd like to model.


Source: (StackOverflow)

How do you estimate an agile project up front? [closed]

When working on fixed price software development projects, I frequently find myself having to estimate the total number of hours a project will take after the price is set, but before the work is started (or VERY early on in the development). Unfortunately, these types of projects are best developed using an iterative/agile method, which means that we don’t (and really can’t) do a complete up-front design.

In a typical scenario, we would have a contract that has X features and Y dollars. After contracting, the engineering department would then need to estimate the number of hours required to complete the X features. There are several possible reasons to need this information up front, including:

• The Y dollars translates to Z hours available, so we have to make sure that time(X)<=Z, perhaps by reducing the scope of X.

• The delivery date is set, and so we have to assign the appropriate resources to meet that date.

Kelly Waters has an interesting take on estimating agile here: http://www.agile-software-development.com/2009/04/agile-estimating.html Unfortunately, these are estimations of difficulty, using a points system, and do not translate to hours.

It seems to me that we need to be able to do one of two things:

• Obtain contracts that have a huge amount of flexibility in them to accommodate an agile development process.

• Figure out how to provide reasonably accurate up-front estimates for features that have not yet been designed.

The first option is of course not an option in most cases. Does anyone have any advice/guidance on how to generate up-front estimates in an agile development scenario?

Alternatively, does anyone see another option for solving our problem through some other process change?


Source: (StackOverflow)

IOS - Creating & Using Interval Specific Timers

I am a newbie IOS developer, but I have a good amount of experience in Android development. My question is regarding the creating and use of interval specific timers.

In android I could easily make a timer like this:

timedTimer = new Timer();
    timedTimer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {

            TimedMethod();
        }

    }, 0, 1000);

Where the interval is 1000 MS and the method TimedMethod() is called on every tick. How would I go about implementing a similar function in IOS?

Thanks so much for reading! Any help at all would be great! :-)


Source: (StackOverflow)

How do you use FogBugz with an Agile methodology?

"Evidence-based scheduling" in FogBugz is interesting, but how do I use it w/ an Agile methodology?


Source: (StackOverflow)

Identify and cancel an alarm send to an AlarmManager

If I use the AlarmManager to schedule an alarm (a PendintIntent which should be send), how can I identify that alarm later to cancel it? Can I cancel all alarms scheduled by my app?


Source: (StackOverflow)

Running a Java method at a set time each day

I'm relatively new to Java and I've pick up a project to work on. However, I've run into a block. I need a method to run at a certain times throughout the day. I've done quite a bit of searching but I can't find anything that seems like it would do the trick. I've run into the Timer class but it appears to run at certain intervals. The Scheduler class, appeared to have the same issue. I also came across Quartz but I think I need something more lightweight and I could only see how to do things at intervals.

Perhaps, just because I'm new, I've missed some things that could help me in these classes, but I'm really stuck and could use some help.

If someone could point me to a class that will run something at a certain time of day, everyday (bonus points for being able to cancel the event), and show me how to correctly use the class, that would be awesome!

TL;DR: Need a class that does something at a time of day, not at an interval because the program may be restarted multiple times throughout the day.


Source: (StackOverflow)

How to schedule my android app to do something every hour

I want my app to access database every hour and read next record from the table then update desctop widget and send notification. I know that there is AlarmManager which I can use to register my Intents but they are deleted when the phone is turned off or rebooted.

Is there any other android class/service that I would update my application continuously even when I reboot my phone?

Thanks,


Source: (StackOverflow)

How expensive are MySQL events?

In my web app I use two recurring events that "clean up" one of the tables in the database, both executed every 15 minutes or so.

My question is, could this lead to problems in performance in the future? Because I've read somewhere -I don't recall where exactly- that MySQL events are supposed to be scheduled to run once a month or so. Thing is, this same events keep the table in a pretty reduced size (as they delete records older than 15~ minutes), maybe this compensates the frequency of their execution, right?

Also, is it better to have one big MySQL event or many small ones if they are be called in the same frequency?


Source: (StackOverflow)