Reach Disk from running from jobs

Hi Render community.

I want schedule some work, and result save in disk. Because disk can’t be shared by CRON service and Web Service I decide to do following.

In my Phython project I created file and was trying to run by calling jobs endpoint

import requests

url = "***/jobs"

payload = {"startCommand": "python"}
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Bearer ***"

response =, json=payload, headers=headers)


service is running, but file is not saved.

this is my

from datetime import datetime

# Get current date
current_date =

# Convert to string
date_str = current_date.strftime('%Y-%m-%d')

# Write to file
with open('/var/data/current_date.txt', 'w') as file:

any ideas why this is happening? P.S. if I’ll save data from endpoint everything works, but when is runned as Jobs, something is wrong. maybe Disk is not available for Jobs as well because it’s virtual environment?

Hi there,

Disks can only be attached to a single instance at a time. This is why autoscaling is disabled when a disk is involved - so similar to webservices and cronjobs, a job can’t access the disk either - a job is an isolated instance of your service.

Worth upvoting a few of the feedback requests we’ve had around this:

John B
Render Support, UTC+1 :uk:

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