Report this

What is the reason for this report?

Can't schedule more than 2 instances of serverless functions per day.

Posted on June 9, 2025

Hello,

I have a namespace with reference fn-5e5e2495-d8e0-4b25-8d4e-93a8a797198c

and a function living there called socials/image

I wanted to schedule a job three times a day but am not able to. On top of that, I tried creating 2 separate files both using the original one to work around it but it’s still not able to create instances.

This is the error I get:

Failures:
Error: While deploying while deploying trigger 'evening-share-2': Request failed with status code 422
While deploying while deploying trigger 'evening-share-3': Request failed with status code 422
While deploying while deploying trigger 'morning-share-1_5': Request failed with status code 422
While deploying while deploying trigger 'morning-share-2': Request failed with status code 422
While deploying while deploying trigger 'morning-share-3': Request failed with status code 422

This is my project.yml

_# project.yml  – no top-level “name:” any more_
packages:
  - name: blog-utils
    functions:
      - name: posts
        runtime: python:3.11
        main: main
        limits:
          timeout: 60000         _# 60 000 ms = 60 s (pick any value ≤ 900 000)_
          memory: 256            _# MB; optional, defaults to 256_
        web: false
        environment:
          DB_HOST:         "${DB_HOST}"
          DB_USER:         "${DB_USER}"
          DB_PASS:         "${DB_PASSWORD}"
          DB_NAME:         "${DB_NAME}"
          SPACES_KEY:      "${SPACE_ACCESS_KEY_CLIENT}"
          SPACES_SECRET:   "${SPACE_ACCESS_KEY_SECRET}"
          SPACES_ENDPOINT: "https://nyc3.digitaloceanspaces.com"
          BUCKET:          "thumbnailx-assets"
        triggers:
          - name: every-morning
            sourceType: scheduler
            sourceDetails:
              cron: "45 15 * * *"   _# 15:10 UTC daily_
  - name: socials
    functions:
      - name: morning-image-share
        runtime: python:3.11
        main: main
        limits:
          timeout: 300000        _# 5 minutes for image generation and sharing_
          memory: 512            _# More memory for AI operations_
        web: false
        environment:
          OPENAI_API_KEY:      "${OPENAI_API_KEY}"
          INTERNAL_API_KEY:    "${INTERNAL_API_KEY}"
        triggers:
          - name: morning-share-1
            sourceType: scheduler
            sourceDetails:
              cron: "0 13 * * *"   _# 13:00 UTC (8AM EST, 5AM PST, 1PM UK)_
          - name: morning-share-1_5
            sourceType: scheduler
            sourceDetails:
              cron: "0 13 * * *"   _# 13:00 UTC (8AM EST, 5AM PST, 1PM UK)_
          - name: morning-share-2
            sourceType: scheduler
            sourceDetails:
              cron: "0 16 * * *"   _# 16:00 UTC (11AM EST, 8AM PST, 4PM UK)_
          - name: morning-share-3
            sourceType: scheduler
            sourceDetails:
              cron: "0 17 * * *"   _# 17:00 UTC (12PM EST, 9AM PST, 5PM UK)_
      - name: evening-image-share
        runtime: python:3.11
        main: main
        limits:
          timeout: 300000        _# 5 minutes for image generation and sharing_
          memory: 512            _# More memory for AI operations_
        web: false
        environment:
          OPENAI_API_KEY:      "${OPENAI_API_KEY}"
          INTERNAL_API_KEY:    "${INTERNAL_API_KEY}"
        triggers:
          - name: evening-share-1
            sourceType: scheduler
            sourceDetails:
              cron: "0 21 * * *"   _# 21:00 UTC (4PM EST, 1PM PST, 9PM UK)_
          - name: evening-share-2
            sourceType: scheduler
            sourceDetails:
              cron: "0 01 * * *"    _# 01:00 UTC (8PM EST prev day, 5PM PST prev day, 1AM UK)_
          - name: evening-share-3
            sourceType: scheduler
            sourceDetails:
              cron: "0 03 * * *"    _# 03:00 UTC (8PM EST prev day, 5PM PST prev day, 1AM UK)_

Could you please help me resolve this



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.