# How to schedule An Epl

**URL:** <https://community.cumulocity.com/t/how-to-schedule-an-epl/796>\
**Category:** Forum\
**Tags:** epl-apps, analytics, cumulocity\
**Created:** [March 26, 2024, 9:26am UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796 "2024-03-26T09:26:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkpatil1010](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jkpatil1010](https://community.cumulocity.com/u/jkpatil1010)\
**Post date:** [March 26, 2024, 9:26am UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/1 "2024-03-26T09:26:02Z")

</div>

Hi,  
i want to write an epl that listens to two different devices at every 15min interval.  
and read the measurement data from both the devices and send a new calculated data to a third device.  
provide me with reference code or document to achieve my requirement.

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)\
**Post date:** [March 26, 2024, 10:14am UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/2 "2024-03-26T10:14:10Z")

</div>

Hi,

you could take a look at Apama Timers: [link to docs](https://cumulocity.com/docs/streaming-analytics/epl-apps/#timers)

> You can also trigger listeners based on time. You can either trigger in a certain interval, for example, fire every 5 minutes (300 seconds). Or you can have a listener fire at certain times of the day, with similar functionality to Unix’s cron scheduler.

---

<div class="post-metadata">

**Author:** ![jkpatil1010](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jkpatil1010](https://community.cumulocity.com/u/jkpatil1010)\
**Post date:** [March 26, 2024, 1:58pm UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/3 "2024-03-26T13:58:48Z")

</div>

@Korbinian_Butz tnx,

can you help me with one additional info.  
i want to call measurement api in epl for particular device and particular series, can i get reference code for this.

note : not using subscription on all MeasurementFragment(),  
other way to call measurements by hardcoding device id and series name.

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)\
**Post date:** [March 26, 2024, 4:28pm UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/4 "2024-03-26T16:28:28Z")

</div>

The _FindMeasurement_ example could help you here: [EPL App - Querying Cumulocity IoT data](https://cumulocity.com/docs/streaming-analytics/epl-apps/#querying-platform-data)

There’s also an example shown when you go to Streaming-Analytics → EPL Apps and select Samples, you can copy it from there:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/b/8/b84b4da0215e6ed50cf57b2591311477dc864b5e.jpeg)

---

<div class="post-metadata">

**Author:** ![jkpatil1010](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jkpatil1010](https://community.cumulocity.com/u/jkpatil1010)\
**Post date:** [March 26, 2024, 6:32pm UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/5 "2024-03-26T18:32:05Z")

</div>

Hi @Korbinian_Butz ,

After getting the response inorder to get the measurement value,  
i am doing : com.apama.cumulocity.MeasurementValue **valueObtained** :=response.measurement.measurements[INPUT\_FRAGMENT][series2];

but getting response as : com.apama.cumulocity.MeasurementValue(45,“”,{}) in **valueObtained** ,

i want get the value “45”, how to do it.

---

<div class="post-metadata">

**Author:** ![Bevan\_Philip](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/bevan_philip/32/19444_2.png) [@Bevan\_Philip](https://community.cumulocity.com/u/Bevan_Philip)\
**Post date:** [March 26, 2024, 6:57pm UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/6 "2024-03-26T18:57:27Z")

</div>

`valueObtained.value` will give you a float representation of the value. See [MeasurementValue (softwareag.com)](https://documentation.softwareag.com/pam/10.15.4/en/webhelp/related/ApamaDoc/com/apama/cumulocity/MeasurementValue.html) for documentation around the MeasurementValue type.

For more information on using the EPL language, further information is available on [EPL Apps - Cumulocity IoT documentation](https://cumulocity.com/docs/streaming-analytics/epl-apps/#advanced-features), [Real-time processing - Cumulocity IoT documentation](https://cumulocity.com/docs/concepts/realtime/#using-epl), and the various links present on those pages.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [September 22, 2024, 6:57pm UTC](https://community.cumulocity.com/t/how-to-schedule-an-epl/796/7 "2024-09-22T18:57:55Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
