Scheduling a task in BotFramework

13
May 16, 2019, at 00:10 AM

My scenario is I want to send an adaptive card to the user every one minute. So, I am using the node-cron module in node to do this. But, some kind of error comes.

I'm using bot emulator.

//function to send the dfr 
sendDfr(turnContext){

        cron.schedule("* * * * * *",async()=>{
            await turnContext.sendActivity({
                attachments:[CardFactory.adaptiveCard(dfrCard)]
            })
        })
    }
}
TypeError: Cannot perform 'get' on a proxy that has been revoked
    at Task.cron.schedule [as execution] (D:\AMAL_ANUSH\kebs_bot\v1\bot.js:61:31)
    at Promise (D:\AMAL_ANUSH\kebs_bot\v1\node_modules\node-cron\src\task.js:52:23)
    at new Promise (<anonymous>)
    at Task.update (D:\AMAL_ANUSH\kebs_bot\v1\node_modules\node-cron\src\task.js:50:7)
    at Timeout.ScheduledTask.task [as _onTimeout] (D:\AMAL_ANUSH\kebs_bot\v1\node_modules\node-cron\src\scheduled-task.js:86:10)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
READ ALSO
How to save an array of objects into a mongoose db

How to save an array of objects into a mongoose db

I am trying to save a leader board made of objects nested in an arrayI want to save it in my database, but I have not been able to create the right schema and I don't think I that is the best way to go

21
How to insert a Distinct and Order in include?

How to insert a Distinct and Order in include?

i'm doing a project in nodejs (express and angular) and im finding difficulties with this sequielizeI cannot add a distinct (at the beginning of the query, i receive too much copies) and i cannot add an order by for a "include field"

18
multiple sockets on one client using angular

multiple sockets on one client using angular

I'm not even sure if this is possibleIf not, please point me in a different direction

26
Meaning in nodejs/postgreSQL : query.query2+=&#39;DELETE FROM public.category_qb_map WHERE qb_id=${id};&#39;;

Meaning in nodejs/postgreSQL : query.query2+='DELETE FROM public.category_qb_map WHERE qb_id=${id};';

I am writing an api in nodejs, in which some data are taken from the body of the request and insert, update and delete operations are performedI am having difficulty in understanding some portions of the code

28