Skip to content

Commit 8303bfc

Browse files
committed
time changed to relativetime
1 parent 2dae453 commit 8303bfc

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

Launcher.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
6868

6969
/* virtual */ const string Launcher::Initialize(PluginHost::IShell* service)
7070
{
71-
Time time;
71+
Time relativeTime;
7272
Time interval;
7373
string message;
7474
Config config;
@@ -83,8 +83,8 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
8383

8484
if (config.ScheduleTime.IsSet() == true) {
8585

86-
time = Time(config.ScheduleTime.Time.Value());
87-
if (time.IsValid() != true) {
86+
relativeTime = Time(config.ScheduleTime.RelativeTime.Value());
87+
if (relativeTime.IsValid() != true) {
8888
SYSLOG(Trace::Warning, (_T("Time format is wrong")));
8989
}
9090

@@ -100,9 +100,9 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
100100
// Well if we where able to parse the parameters (if needed) we are ready to start it..
101101
_observer.Register(&_notification);
102102

103-
if (time.IsValid() == true) {
103+
if (relativeTime.IsValid() == true) {
104104
Core::Time scheduledTime(Core::Time::Now());
105-
uint64_t timeValueToTrigger = ((time.Hour() * 60 + time.Minute()) * 60 + time.Second()) * 1000;
105+
uint64_t timeValueToTrigger = ((relativeTime.Hour() * 60 + relativeTime.Minute()) * 60 + relativeTime.Second()) * 1000;
106106
scheduledTime.Add(timeValueToTrigger);
107107

108108
PluginHost::WorkerPool::Instance().Schedule(scheduledTime, _activity);

Launcher.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,22 +300,22 @@ class Launcher : public PluginHost::IPlugin {
300300
public:
301301
Schedule()
302302
: Core::JSON::Container()
303-
, Time()
303+
, RelativeTime()
304304
, Interval() {
305-
Add(_T("time"), &Time);
305+
Add(_T("relativetime"), &RelativeTime);
306306
Add(_T("interval"), &Interval);
307307
}
308308
Schedule(const Schedule& copy)
309309
: Core::JSON::Container()
310-
, Time(copy.Time)
310+
, RelativeTime(copy.RelativeTime)
311311
, Interval(copy.Interval) {
312-
Add(_T("time"), &Time);
312+
Add(_T("relativetime"), &RelativeTime);
313313
Add(_T("interval"), &Interval);
314314
}
315315
~Schedule() {
316316
}
317317
public:
318-
Core::JSON::String Time;
318+
Core::JSON::String RelativeTime;
319319
Core::JSON::String Interval;
320320
};
321321

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Plugin to "Launch" linux applications and scripts
6060

6161
### How to schedule an application/script
6262

63-
1. Add schedule time information to the Launcher.json in the HH:MM.SS format (Hour:Minute.Second)
63+
1. Add schedule relative time information to the Launcher.json in the HH:MM.SS format (Hour:Minute.Second)
6464
```
6565
"configuration": {
6666
"command":"du",
@@ -69,11 +69,11 @@ Plugin to "Launch" linux applications and scripts
6969
{ "option": "-h"}
7070
],
7171
"schedule": {
72-
"time": "06:04.10"
72+
"relativetime": "06:04.10"
7373
}
7474
}
7575
```
76-
Note: If time value is "00:00.00"/invalid format/not set, the launcher will ignore the given time and launch the application at the launcher activation time itself.
76+
Note: If relative time value is "00:00.00"/invalid format/not set, the launcher will ignore the given time and launch the application at the launcher activation time itself.
7777

7878
### How to schedule an application/script to run in an interval
7979

@@ -86,7 +86,7 @@ Note: If time value is "00:00.00"/invalid format/not set, the launcher will igno
8686
{ "option": "-h"}
8787
],
8888
"schedule": {
89-
"time": "06:04.10",
89+
"relativetime": "06:04.10",
9090
"interval": "00:40.10"
9191
}
9292
}

0 commit comments

Comments
 (0)