void main()
{
if( get_property( "_sessionNumber" ) == "" ) set_property( "_sessionNumber" , "1" );
if( get_property( "_lastRun" ) == "" ) set_property( "_lastRun" , today_to_string() );
if( get_property( "_lastRun" ) != today_to_string() )
{
set_property( "_lastRun" , today_to_string() );
set_property( "_sessionNumber" , "1" );
}
if( get_property( "_sessionNumber" ).to_int() == 1 )
{
## Stuff to run once a day goes here.
}
if( get_property( "_lastRun" ) == today_to_string() ) set_property( "_sessionNumber" , ( get_property( "_sessionNumber" ).to_int() + 1 ).to_string() );
}