--- title: "Lifecycle and Custom Scripts" url: https://docs.catalyst.zoho.com/en/cli/v1/scripts/lifecycle-and-custom-scripts/ description: "Catalyst provides the functionality for automating CLI and terminal command executions during the testing or deployment process in the form of scripts." last_updated: 2023-12-14T10:55:23Z service: All Services type: general --- # Lifecycle and Custom Scripts Before you learn about writing a script, let's discuss the two types of scripts supported in Catalyst. Catalyst supports the following lifecycle scripts: 1. ` **preserve:** ` The script is run automatically before the [catalyst serve](https://docs.catalyst.zoho.com/en/cli/v1/serve-resources/introduction/) command is executed. 2. ` **postserve:** ` The script is run automatically after the `catalyst serve` command is executed. 3. ` **predeploy:** ` The script is run automatically before the [catalyst deploy](https://docs.catalyst.zoho.com/en/cli/v1/deploy-resources/introduction/) command is executed. 4. ` **postdeploy:** ` The script is run automatically after the `catalyst deploy` command is executed. You can set custom scripts to automatically execute any time you need them to, in the order that you need, by calling them inside the lifecycle scripts. > **Note:** 1. All the above mentioned scripts will be executed in the source directory of the current Catalyst component. 2. You can choose to skip the executions of the lifecycle scripts configured in the `catalyst.json` file while testing or deploying the components. To do so, you must execute the `catalyst serve` or `catalyst deploy` with the `-\\-ignore-scripts` option. Refer to their respective help pages for details.