Scheduled Tasks
Depfloy allows you to schedule tasks on your server. This section will cover the scheduled tasks features Depfloy provides to keep your server running smoothly.
How to Schedule Tasks?
You may need to run several tasks daily, weekly, monthly or custom intervals. This could be an apt-get update command or a Laravel Scheduler task. You can easily schedule these tasks with Depfloy. Depfloy uses the cron service to schedule tasks on your server.
You can schedule tasks by navigating to the “Scheduled Jobs” section in the server settings at https://app.depfloy.com/servers/<serverID>/scheduled-jobs.
To schedule a new task, click the “Add Scheduled Job” button in the top right corner of the page by providing the following information:
- Job Name: The name of the scheduled job.
- Command: The command to run the scheduled job.
- Directory: The directory to run the scheduled job. It defaults to the root directory of the server.
- User: The user to run the scheduled job.
- Frequency: The frequency to run the scheduled job. You can select from the following options: Daily, Weekly, Monthly, Custom.
- Cron Expression: The cron expression to run the scheduled job.
We recommend using crontab.guru to generate a custom cron expression for your task.
Also, you can stop, start, pause, resume, restart, edit or delete the scheduled tasks from this page.