How can use and how it works the card "fixed sched...
# 🤝help
b
I need to execute a code periodically and this card should be able to
f
Hey, It is like this:
b
Hi
I´ve been waiting more than 60 seconds to that messag to pop up
also tried with this syntax
f
it doesn't work in the emulator 🙂
And don't use the text message, I don't think it knows the conversation ID
b
so I can know its working is there a test that I can do?
I even made this code that when it runs it should set the variable userVariable to true after 60 seconds. I don´t know what to do anymore
f
Did you publish it?
And test it from the channel (webchat for example) ?
l
@famous-jewelry-85388 - I have the same issue, my fixed schedule cron is working, however, it is not aware of the conversation ID. user-level variable values do not seem to be working.
Copy code
Transition from (flow:Menu) [node:UPICheck] to [node:CheckUPIStatus]
[477f9de0aa]    [bot-action]    [flow:Menu] [node:CheckUPIStatus] [card:action]:     Execute code "inline-card:action.js"
[477f9de0aa]    [bot-action]    [flow:Menu] [node:CheckUPIStatus] [card:action]:     Session Id
there should be a link to show that this expression triggers the fixed schedule 😄
and now the bigger question is how to stop it programmatically
q
I tested this also after publishing, with the same results. Cron is working, I tried it to console.log "Hi!" and it did that.
When trying to periodically send a message to the user, execute code and change user variables or similar tasks, it needs conversationId
Many bot builders have asked why the Fixed Schedule / cron job doesn't work in Botpress, or if it does, how to do it 🤷‍♂️ I have answered that this could work better by using the Botpress API. For a few bot builders I have built a custom solution for their needs that compares the time of the latest message with the time of previous messages. I run cron jobs on my Linux servers so I'm familiar with it, and cron jobs would be the easiest way to handle all these tasks in the Botpress cloud as well 🛠️ 💎
l
I too realised that the fixed schedule loses context every time it runs. I don't have a solution yet. Someone from @User. Need help here
f
hey guys, did you try also adding the channel? Not only the ocnversation ID?
l
Need to try @famous-jewelry-85388
q
Did you manage to use Fixed Schedule / cronjob with Bassam's 🦸‍♂️ new instructions?
l
@quick-musician-29561 not yet, I will be after holidays in the new year. Will update here if it works
q
Have you tried it again, did you get cron to work with Botpress? 💡 🛠️
f
I will mark it as solved for now. If you still have question or inquiries, please start a new thread. If the above didn't work, please mention me here in a comment 🙂
l
I did not try
q
@limited-pencil-78283 Here I used cron to automatically send KB table data to Google Sheets https://discord.com/channels/1108396290624213082/1194161232052244521 I think now we know where the Fixed Schedule works and where it doesn't
l
2 Views