cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

i have services code but how to implement schedulers

Hariharasuthan
12-Amethyst

i have services code but how to implement schedulers

i have services code but how to implement schedulers 

me.SendMessage({

              cc: "xxx@gmail.com" /* STRING */,

              bcc: "yyy@gmail.com" /* STRING */,

              subject: "this well"/* STRING */,

              from: "zzz@gmail.com" /* STRING */,

              to: "hariharasuthan@yahoo.co.in" /* STRING */,

              body: "this is verywell" /* HTML */

});

this services was running  e-mail but  i need  (hour,day,week,month,year) this based  how to implement schedulers concept 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Hariharasuthan 

 

You can use 'Scheduler' Thing to trigger an event based on CRON String.

 

Based on the CRON String event will be triggered hourly, weekly, or Monthly 

 

Step 1: Create a Scheduler Thing

CS1.PNG

 

Step 2: Configure CRON String

CS2.PNG

 

Step 3: Create a Subscription to trigger email 

CS3.PNG

 

/ VR

View solution in original post

9 REPLIES 9

Hi @Hariharasuthan 

 

You can use 'Scheduler' Thing to trigger an event based on CRON String.

 

Based on the CRON String event will be triggered hourly, weekly, or Monthly 

 

Step 1: Create a Scheduler Thing

CS1.PNG

 

Step 2: Configure CRON String

CS2.PNG

 

Step 3: Create a Subscription to trigger email 

CS3.PNG

 

/ VR

hi @Velkumar  

 i have completed step by step process as you suggested but i am unable to receive emails every five Minutes ,please let know any additional steps  to do, i need  one full example . Thank you .

Hariharasuthan_0-1679924476246.png

 

          

 

HI @Hariharasuthan 

 

Could you please show your CRON String? 

 

Below CRON string should trigger the scheduler event every 5 min 

 

0 */5 * ? * *

 

 

You can also use this link to generate CRON String

 

And could you please elaborate on your use case?

hi @Velkumar ,

i here attached is screenshot. 

Hariharasuthan_0-1679981709125.png

Hariharasuthan_2-1679981809374.pngHariharasuthan_3-1679981834280.png

Hariharasuthan_4-1679981860042.png

Hariharasuthan_5-1679981883617.png

 

 

 

Everything looks good.

 

Please change your CRON String to 

 

0 */5 * ? * *

 

If you want to trigger mail every 5 mins

 

Based on your CRON String event will be triggered every hour after 5 mins

 

Velkumar_1-1679983415318.png

 

And check whether the subscription is enabled

 

Velkumar_0-1679983331899.png

 

 

 

hi @Velkumar 

        please help me, i have learning stage thingworx developer.  i plan to every five minutes sent mail . 

 

step 1:

  • General Informationname :xxxproject :yyyy           
  • base thing:
      Run As User  (required) :hariharasuthan not administrator  (admin user need or not? )Schedule  (required):0 0/5 * * * ?
 
step 2:
  • Properties and Alertsno any changes 

step 3:

         Services

step 4:

Events

ADD -> new event created ,         event name:xxyy , datashape : one mapped

step 5:Subscriptions

Subscriptions name :xyz

source: me selected  then Enable button click 

 

input -> event->scheduledEvent  ,then what do to 

email code which place ,write code , 

me.SendMessage({
cc: "mmmm@gmail.com" /* STRING */,
bcc: "kkkk@gmail.com" /* STRING */,
subject: "this well"/* STRING */,
from: "hh@gmail.com" /* STRING */,
to: "ppp@yahoo.co.in" /* STRING */,
body: "this is verywell" /* HTML */
});

 

 

please one E-mail example give me  

i have done email sent, but how to implement scheduling. 

Check this video 

https://youtu.be/cgR5DTUgy8A

hi @Velkumar ,

thanks  to support, useful this  video  ,i  completed schedulers ,

 

regards 

Hariharasuthan

Top Tags