Using a Timer Trigger
For details about the timer event source, see Supported Event Sources.
Prerequisites
You have created a function on FunctionGraph. For details, see Creating and Initializing a Function.
Creating a Timer Trigger
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the HelloWorld function.
- Choose Configuration > Triggers and click Create Trigger.
- Set the following parameters:
- Trigger Type: Select Timer.
- Timer Name: Enter a timer name, for example, Timer.
- Rule: Set a fixed rate or a cron expression.
- Fixed rate: The function is triggered at a fixed rate of minutes, hours, or days. You can set a fixed rate from 1 to 60 minutes, 1 to 24 hours, or 1 to 30 days.
- Cron expression: The function is triggered based on a complex rule. For example, you can set a function to be executed at 08:30:00 from Monday to Friday. For more information, see Cron Expression for a Function Timer Trigger.
- Enable Trigger: Choose whether to enable the timer trigger.
- Additional Information: The additional information you configure will be put into the user_event field of the timer event source. For details, see Supported Event Sources.
- Click OK.
Viewing the Execution Result
After the timer trigger is created, the HelloWorld function is executed every 1 minute. To view the function running logs, perform the following steps:
- Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
- Click the HelloWorld function.
- On the function details page, choose Monitoring > Logs to view function logs.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot