Learn more about crons and how to manage them in the context of an application, deployment or virtual machine.
There are three places where you can add crons:
The first two types, Application and Deployment, are handled via the Crons tab. Either go to Deployment -> select deployment -> Crons or Application -> select application -> Deployment -> Crons for a deployment type Cron.
If you do not have deployments enabled, then the normal application cron is found in Application -> select application -> Crons.
From this page, you can add new scheduled commands that will run as the desired user. Please make sure to validate your time expressions using a tool such as crontab.guru.
If you do not have the deployment option enabled (this means that you do not have a git attached to an application) then you will need to create a special file that conforms to the cron specifications.
1. Go to your web server/virtual machine page and choose the VM you wish to proceed with
2. Click on the OPS tab
3. Click the Automations section
4. Click +Add new Automation Action
5. Search for the New File automation and click the +add button
6. The resulting New File Action Template page will be used as a template for your desired cron.
There are two items that are critical:
File path: please ensure that you put your file in the /etc/cron.d/ directory with a unique name (the name of your application should be sufficient) and with no file extension
Script editor: please ensure that you use the correct time format for the cron, the correct user of the application and the command is specified in full.
7. Click the Save changes button.
8. From the menu of the Automation select Run this action
9. Check that the cron is running as you expect it by using the tools provided in your application