h1. Schedule lifecycle

When creating an action for a node the administrator chooses a lifecycle. The action is triggered whenever the node enters the selected lifecycle:<br>

+ If the lifecycle is *user action*: the action is executed when the *user right-clicks* on the node and selects the action in the context menu.<br>
+ If the lifecycle is *add*: the action is executed when a *new child node* is created.<br>
+ If the lifecycle is *modify*: the action is executed when the node is *modified*.<br>
+ If the lifecycle is *schedule*: the action is triggered at a *specific time*. There are 2 schedule lifecyle types: *period* and *cron*<br>



h1. Period

To create an action with period lifecycle, do the followings:

1\. Create a node and select <br>
2. Click on
!icon1.jpg!
 to open the *Manage Action* form


!action1.jpg!


- Select the *Add Action* tab<br>
- Select type of action<br>
- Select *Lifecycle* is schedule<br>
- Select *Schedule type* is period<br>
- Select time to start action and time to end action by clicking on these fields to open a mini calendar<br>
- Select Repeat count and Time interval<br>
- Put values in other required fields<br>

3. Click *Save* --> the action will start at the time you set in *Start time* field and finish at the time set in the *End time* field.<br> <br>

h1. Cron

To create an action with period lifecycle, do the followings:

1\. Create a node and select

2. Click on
!icon1.jpg!
 to open the *Manage Action* form:


!action2.jpg!


- Select *Add Action* tab<br>
- Select type of action<br>
- Select *Lifecycle* is schedule<br>
- Select *Schedule type* is cron<br>
- Put values in *Cron expression*. You can type with some valid cron expression like that:<br>

* "0 0 12 * * ?" Fire at 12pm (noon) every day<br>
* "0 15 10 ? * *" Fire at 10:15am every day<br>
* "0 15 10 * * ?" Fire at 10:15am every day<br>
* "0 15 10 * * ? *" Fire at 10:15am every day<br>
* "0 15 10 * * ? 2005" Fire at 10:15am every day during the year 2005<br>
* "0 * 14 * * ?" Fire every minute starting at 2pm and ending at 2:59pm, every day<br>
* "0 0/5 14 * * ?" Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day<br>
* "0 0/5 14,18 * * ?" Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day<br>
* "0 0-5 14 * * ?" Fire every minute starting at 2pm and ending at 2:05pm, every day<br>
* "0 10,44 14 ? 3 WED" Fire at 2:10pm and at 2:44pm every Wednesday in the month of March.<br>
* "0 15 10 ? * MON-FRI" Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday<br>
* "0 15 10 15 * ?" Fire at 10:15am on the 15th day of every month<br>
* "0 15 10 L * ?" Fire at 10:15am on the last day of every month<br>
* "0 15 10 ? * 6L" Fire at 10:15am on the last Friday of every month<br>
* "0 15 10 ? * 6L" Fire at 10:15am on the last Friday of every month<br>
* "0 15 10 ? * 6L 2002-2005" Fire at 10:15am on every last friday of every month during the years 2002, 2003, 2004 and 2005<br>
* "0 15 10 ? * 6#3" Fire at 10:15am on the third Friday of every month<br>

- Put values in other required fields<br>
3. Click the *Save* button. The action will be executed, depending on the expression set in the *Cron expression* field
  	
