Trigger workflows on an interval or cron schedule.
The Schedule app in Pipedream is a powerful tool that allows you to trigger workflows at regular intervals, ranging from every minute to once a year. This enables the automation of repetitive tasks and the scheduling of actions to occur without manual intervention. By leveraging this API, you can execute code, run integrations, and process data on a reliable schedule, all within Pipedream's serverless environment.
import 'dotenv/config';
import { Sandbox } from '@e2b/code-interpreter';
export default defineComponent({
props: {
e2b: {
type: "app",
app: "e2b",
}
},
async run({steps, $}) {
const sbx = await Sandbox.create({
apiKey: this.e2b.$auth.api_key
}); // By default the sandbox is alive for 5 minutes
return await sbx.runCode('print("hello world")'); // Execute Python inside the sandbox
},
})