A simple timer Applet

Source: Internet
Author: User

(Dll defines an interface and two methods Initialize and HandleConditionsMetEvent are defined );

            HandleConditionsMetEvent(              Initialize(ScheduleDefinition schedule,     configFileName =

3) configure the app. config file. The parameter settings in the configuration file are described as follows:

A. <at> </at> is a Task. If different programs are triggered at different times, you must set multiple <at>; name: the name of each <at>, you can name the Task as needed. month: the month in which the Task is triggered. * indicates that the Task is triggered every month. dayofMonth: Number of each month. * indicates that the Task is triggered every day. dayOfWeek: number of times a week, * Indicates triggering every day; hour: the number of times a day, * Indicates triggering every hour; minute: triggered several minutes every hour, 58 indicates the trigger at 58 points per hour; second: the number of seconds per minute.

B. <task> is the class to be triggered. type: "The detailed address of the class to be triggered (project name. folder name. class Name), Project name, Version, Culture, PublicKeyToKen ", parameters: the parameter to be passed. If no parameter is passed, you can set it "";

<taskSchedulerEngine>    <schedule>      <at name= month= dayOfMonth= dayOfWeek= hour= minute= second= kind=>        <execute>          <task type= parameters= />        </execute>      </at>    </schedule></taskSchedulerEngine>

4) The main program to enable the Timer Program:

SchedulerRuntime.StartWithConfig();

Okay, so far, a complete Timer Program has been completed. Thank you for your valuable comments.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.