How to Reset the Time Interval

ajaybabuCh
Member Posts: 208
Hi
I have to run some process in Navison daily at 7 PM by taking the starting time of the NAS.
suppose if I started NAS at 1 PM, then I'll set the timeinterval after 6 hours
for the first time and from next time I reset the timerinterval to next 24 hours through code in the single instance codeunit running by the nas.
but its not working in that way.
Name DataType
Timer Automation 'Commerce Gateway Timer'.Timer
TimeInterval Integer. (suppose that initially it has 300000 for 5 minutes)
IF ISCLEAR(Timer) THEN
CREATE(Timer);
Timer.Interval:=TimeInterval;
IF Timer.Enable THEN;
i ran my process for 5 minutes , next time i want to run the process
after 30 minutes
after running the process i changed the TimeInterval variable to
TimeInterval = 600000 in the TimerEvent
but its not working.
The following is My single Instance codeunit
OnRun
TimeInterval:=300000 //first want to run after 5 minutes
IF ISCLEAR(Timer) THEN
CREATE(Timer);
Timer.Interval:=TimeInterval;
IF Timer.Enable THEN;
Timer::TimerEven()
{
// code to run some process
}
TimeInterval = 600000 // next time want to run for 10 minutes which in not effecting
cananybody give me any idea on this
I have to run some process in Navison daily at 7 PM by taking the starting time of the NAS.
suppose if I started NAS at 1 PM, then I'll set the timeinterval after 6 hours
for the first time and from next time I reset the timerinterval to next 24 hours through code in the single instance codeunit running by the nas.
but its not working in that way.
Name DataType
Timer Automation 'Commerce Gateway Timer'.Timer
TimeInterval Integer. (suppose that initially it has 300000 for 5 minutes)
IF ISCLEAR(Timer) THEN
CREATE(Timer);
Timer.Interval:=TimeInterval;
IF Timer.Enable THEN;
i ran my process for 5 minutes , next time i want to run the process
after 30 minutes
after running the process i changed the TimeInterval variable to
TimeInterval = 600000 in the TimerEvent
but its not working.
The following is My single Instance codeunit
OnRun
TimeInterval:=300000 //first want to run after 5 minutes
IF ISCLEAR(Timer) THEN
CREATE(Timer);
Timer.Interval:=TimeInterval;
IF Timer.Enable THEN;
Timer::TimerEven()
{
// code to run some process
}
TimeInterval = 600000 // next time want to run for 10 minutes which in not effecting
cananybody give me any idea on this
Ajay
0
Comments
-
0
-
is that not possible with timer intervalAjay0
-
You forgot set the property of Timer automation
Timer.TimerInterval := Timeinterval;0 -
Hello ajaybabuCh,
Have solve your issue?
Have you find a way to reset the timer?
Thanks.Rodel Bernardo
Pressure is an opportunity.0 -
Did you try with TimerAutomation.Enabled := TRUE and TimerAutomation.Enabled := false~~ravi0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions