tags:

views:

24

answers:

1

Does Eclipse provide a way to schedule the execution of a Java script? (e.g., if I need to schedule a script at 6 am, every day...)

Thanks.

A: 

I'm not familiar with any built-in service. Nevertheless, Eclipse is written in Java, so there's no problem writing your own Java code for doing this. You can use the Timer class to schedule your code execution.

You "script" should be enclosed in an Eclipse plug-in. Use the Activator.start to schedule your process when the plugin loads.

zvikico
Thanks for the reply. I'm still not sure of the eclipse plugin. Here is the structure of my program:public class A extends SeleneseTestCase {@BeforeTestpublic void setUp() {...}@Testpublic void testCase () {...}@AfterTestpublic void tearDown () {...}The @Test method needs to be scheduled to run periodically (say at 6 am everyday). How do I "fit" the timer, plugin? Thanks.
Rajat
There are several questions here. Q1: How to write Java code that will run periodically? Q2: How to write an Eclipse plugin with an activator. I suggest you start by Googling these two subjects. If you're still lost, you can ask more specific questions.
zvikico