JS business logic works only while debugging

I have two JS timers deployed to my backendless app. One is querying for objects that have reached their expiration date and then changing its property active to false. The second one searches for objects that are already deactivated and expired for over 1 day and then deletes them.

Everything works just fine when i hit debug in IntelliJ. I see the tasks coming, whenever I change an objects expiration date to few days back it is correctly marked as inactive and removed by the timers. But when I just hit deploy the code isn’t running. I can change the exp. dates of as many objects as I want and nothing happens. Again when I click debug and get a peek on the process it starts working and all of the objects are being removed. So the code works but only while debugging…

Hi again,

Have you tried launching your timer manually - would it do the thing you expect? There’s a button called “Run” on console.

As described in the documentation, the cloud environment is not ready yet, so deployed code will not work.

When I run them manually sometimes they work sometimes they don’t I guess It’s because of what Vitaly Vengrov said. I’ll just have to wait until the environment is ready and try again later :wink: