When we released custom code earlier this year, many of our customers asked us about scheduling their server side custom code. This was required to do some background activity on App data on periodic basis. We considered this requirement for your product release and now it is available for usage.
Here are few steps to schedule your server side custom code:
- Deploy Your Custom Code in App42 Cloud.
- Login to AppHQ console.
- Select Custom Code from left menu panel.
- Click on Schedule Service.
- Select your App and custom code service name from the drop down located on upper left side of central panel.
- Click on Schedule Service button adjacent to drop down.
- Enter required details in pop up window which are explained as below:
- JSON Body : JSON to be passed as input to your code (non-mandatory)
- Date : Date for your custom code job execution
- Time : Time for job execution
- Time Zone: Time Zone in which you have passed the above two values i.e. date and time
- Repeat Count: How many times your job should run after first execution. Pass 0 if you want to run it only one time otherwise pass increment from first execution.
- Repeat Forever: Select if you want your job to be run always. This will be equivalent to infinite repeat count value.
- Repeat Interval: Interval in seconds between consecutive job execution time.
- Once you are done with above details, click on Schedule button.
- Once your code is scheduled you should be able to see scheduled service details like next fire time, previous fire time, repeat count, and interval defined as shown below
- You can cancel your schedule job any time by clicking on Cancel Schedule button in top menu in center panel.