How to create a CRON job using Pipedream API?


This cmd creates a Source on Pipedream (that runs a script every 15s):

pd deploy --run job.js --timer --frequency 15s

I want to replicate creating this Source via Pipedream API.

My “job.js” contains a script to run an HTTP request to my server, but it could be anything.

My current Pipedream API request to replicate that cmd looks like this but it doesn’t work:
POST → “

    "component_url": "",
    "name": "aaaa",
    "configured_props": {
        "timer": {
            "cron": null,
            "interval_seconds": 15

How can I run a “job.js” on schedule? Or, even better, how can I create a Pipedream job to run an HTTP request on schedule, all by making a Pipedream API request. I don’t want to use Pipedream’s UI to do it (I could), because I want to run this when deploying my application.


No, I’m asking how to do it via Pipedream API. I stated that in my question that I DO NOT WANT to use the Pipedream UI.

@ocoya Sometimes we may misread a question, but we’re providing you a generous free tier and free support - please be patient and respectful when you respond.

The file you’re trying to deploy is not a Pipedream component, which is why it won’t deploy. It’s an app file, which helps abstract common methods and data across components for the same app.

The easiest way to achieve what you want is to build your own event source. That will let you run code on a schedule. Within the component’s run method, you can run any code you’d like, so you can make an HTTP request with an HTTP client like axios or got there.

Let us know if that helps.