-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScheduler1.java
79 lines (62 loc) · 1.44 KB
/
Scheduler1.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package summm;
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javax.swing.*;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.util.TimerTask;
import java.util.Timer;
import javax.swing.JOptionPane;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
public class Scheduler1
{
int flag=0;
Timer timer = new Timer();
TimerTask task = new TimerTask()
{
public void run()
{
if (flag==0){
First obj=new First();
obj.start();
flag++;
}
else if(flag==1)
{
Second obj=new Second();
obj.start();
flag++;
}
else if(flag==2)
{Third obj=new Third();
obj.start();
flag++;
}
}
};
/**
* @wbp.parser.entryPoint
*/
public void start() {
// TODO Auto-generated method stub
timer.scheduleAtFixedRate(task, 2*60*1000, 2*60*1000);
}
/**
* @wbp.parser.entryPoint
*/
public static void main(String[] args)
{
System.setProperty("webdriver.ie.driver", "C:\\Users\\admin2\\Desktop\\IEDriverServer.exe");
Scheduler1 you =new Scheduler1();
you.start();
}
public void stopp()
{
timer.cancel();
}
}