azure-docs-sdk-java/archive/docs-ref-autogen/com.microsoft.azure.functio...

199 строки
4.4 KiB
YAML
Исходник Обычный вид История

2020-12-04 07:30:31 +03:00
### YamlMime:JavaType
methods:
- fullName: com.microsoft.azure.functions.annotation.TimerTrigger.dataType()
name: dataType()
nameWithType: TimerTrigger.dataType()
returns:
description: <p>The dataType which will be used by the Functions runtime. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Defines how Functions runtime should treat the parameter value. Possible values are:</p>
<p>
<ul>
<li>
<p>"": get the value as a string, and try to deserialize to actual parameter type like POJO </p>
</li>
<li>
<p>string: always get the value as a string </p>
</li>
<li>
<p>binary: get the value as a binary data, and try to deserialize to actual parameter type byte[] </p>
</li>
</ul>
</p>
syntax: public String dataType() default ""
uid: com.microsoft.azure.functions.annotation.TimerTrigger.dataType()
- fullName: com.microsoft.azure.functions.annotation.TimerTrigger.name()
name: name()
nameWithType: TimerTrigger.name()
returns:
description: <p>The name of the variable that represents the timer object in function code. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>The name of the variable that represents the timer object in function code.</p>
<p></p>
syntax: public String name()
uid: com.microsoft.azure.functions.annotation.TimerTrigger.name()
- fullName: com.microsoft.azure.functions.annotation.TimerTrigger.schedule()
name: schedule()
nameWithType: TimerTrigger.schedule()
returns:
description: <p>A string representing a CRON expression that will be used to schedule a function to run. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>A <a href="http://en.wikipedia.org/wiki/Cron#CRON_expression">CRON expression</a> in the format <code>{minute} {hour} {day} {month} {day-of-week} 
</code> .</p>
<p>
<table rows="7" cols="2">
<caption>A table showing some examples of CRON expressions that could be used.</caption>
<row>
<entry thead="yes">
<p>Goal </p>
</entry>
<entry thead="yes">
<p>CRON Expression </p>
</entry>
</row>
<row>
<entry thead="no">
<p>To trigger once every five minutes: </p>
</entry>
<entry thead="no">
<p>0 *&amp;#47;5 * * * * </p>
</entry>
</row>
<row>
<entry thead="no">
<p>To trigger once at the top of every hour: </p>
</entry>
<entry thead="no">
<p>0 0 * * * * </p>
</entry>
</row>
<row>
<entry thead="no">
<p>To trigger once every two hours: </p>
</entry>
<entry thead="no">
<p>0 0 *&amp;#47;2 * * * </p>
</entry>
</row>
<row>
<entry thead="no">
<p>To trigger once every hour from 9 AM to 5 PM: </p>
</entry>
<entry thead="no">
<p>0 0 9-17 * * * </p>
</entry>
</row>
<row>
<entry thead="no">
<p>To trigger at 9:30 AM every day: </p>
</entry>
<entry thead="no">
<p>0 30 9 * * * </p>
</entry>
</row>
<row>
<entry thead="no">
<p>To trigger at 9:30 AM every weekday: </p>
</entry>
<entry thead="no">
<p>0 30 9 * * 1-5 </p>
</entry>
</row>
</table>
</p>
<p></p>
syntax: public String schedule()
uid: com.microsoft.azure.functions.annotation.TimerTrigger.schedule()
2020-12-04 07:30:31 +03:00
nameWithType: TimerTrigger
syntax: public interface TimerTrigger
type: interface
uid: com.microsoft.azure.functions.annotation.TimerTrigger
fullName: com.microsoft.azure.functions.annotation.TimerTrigger
name: TimerTrigger
package: com.microsoft.azure.functions.annotation
summary: >-
<p>TimerTrigger(name = "keepAliveTrigger", schedule = "0 *&amp;#47;5 * * * *") String timerInfo, ExecutionContext context ) { // timeInfo is a JSON string, you can deserialize it to an object using your favorite JSON library context.getLogger().info("Timer is triggered: " + timerInfo); }</p>
<p></p>
metadata: {}