Cronjob needs to write in a file

Hi all,

hope you are well.

Easy question:
I have a cronjob that needs to write in a file (well its a sqllite file, but I can change it to a simple txt if needed). How can I do this in render?


Probably the best answer here is to consider rearchitecting.

What would you intend doing with the resultant file?

John B

Grrr :frowning:

The job just goes to a website, take a number and records it in the file. I want to have the historical data.

I had the script running on Digital Ocean, and I wanted to move it here to Render to lower costs ($7/month).

Any ideas?


Well the first problem is that cronjobs on us run as a separate service, they’re not like a typically cron job where the run on the same machine as your website. Services on us are isolated so they don’t have access to each other either. Services are based on the deployed code, so whilst you can attach a disk to some services for persistent storage you can’t attach them to cronjobs.

Of course, if you’re using a database here like Postgres, your website can read data from it and your cronjob can write data into it.


John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.