Save data with Moralis Cloud Job

Hi
I want to save data periodically using moralis.cloud.job. But it is not work. How can I save data with cloud job?

Screenshot from 2022-02-17 22-41-29

At a first look it looks like first line has a syntax error with tat request without ()

What part doesn’t work? Can you make it work with a cloud function first?

no. request without () is ES6 property. It is true. I dont understand why it was not working but I try another command so working.

It doesn’t seem to be saving data there, it seems like you’re trying to query something instead

check this on how to save object to DB https://docs.moralis.io/moralis-server/database/objects#saving-objects

I firstly try to query something and then I’ll save data. But it didn’t work.

now it is working :slight_smile:

Yeah coz there’s only the query script but not the save script, this is what requires for saving

Object.save()

and you’re not including it in your code

it’s not not working, you’re just not having it in your code

I added some code :slight_smile:
I try to write another function. And it is cool

Hey @zfiratselim if you show us the new one, we’ll be able to help

we will not know what you added in your cloud function if you didn’t tell us :raised_hands: