Navision 4.0 SP1 NAS Problem

Kc_Nirvana
Member Posts: 146
Hello.....
I have a problem with the NAS Server.......
I have the NAS Server connected to the Job Scheduler.
My CU that runs with NAS
But when it cames to run an object from the Job Scheduler doesn't run...... (RunObjectFromJobSched.RUN(JobSchedSetup) )
The object that runs in Job Scheduler is:
But if i go to the job scheduler and run the task, it runs perfectly
Can someone helps with this problem?
I have a problem with the NAS Server.......
I have the NAS Server connected to the Job Scheduler.
My CU that runs with NAS
OnRun() IF ISCLEAR(Timer) THEN CREATE(Timer); JobSchedMgtSetup.GET(); IF JobSchedMgtSetup."Log Scheduler Actions" THEN UpdateStatus('',Text006,FALSE); COMMIT; Timer.Enabled := FALSE; Timer.Interval := JobSchedMgtSetup."Interval Check (Sec.)" * 1000; Timer.Enabled := TRUE; IF JobSchedMgtSetup."Nas - In Execution" THEN CheckAndRunScheduler; CheckAndRunScheduler() JobSchedSetup2.RESET; JobSchedSetup2.SETCURRENTKEY("Next Check Date","Next Check Time"); JobSchedSetup2.SETFILTER("Next Check Date",'<>%1',0D); JobSchedSetup2.SETRANGE("Run Status",JobSchedSetup2."Run Status"::" ",JobSchedSetup2."Run Status"::"With Error"); JobSchedSetup2.SETRANGE(Enabled,TRUE); JobSchedSetup2.SETRANGE(JobSchedSetup2."NAS Startup Parameter",NASStartupParameter); IF JobSchedSetup2.FIND('-') THEN BEGIN REPEAT JobSchedSetup := JobSchedSetup2; IF RunNow(JobSchedSetup."Next Check Date",JobSchedSetup."Next Check Time") THEN BEGIN IF AllObj.GET(JobSchedSetup."Object Type",JobSchedSetup."Object No.") THEN BEGIN IF RunObjectFromJobSched.RUN(JobSchedSetup) THEN BEGIN JobSchedSetup.LOCKTABLE; NewDateAndTime(JobSchedSetup); END ELSE BEGIN JobSchedSetup.LOCKTABLE; JobSchedSetup."Message Text" := ''; ErrorHandling(JobSchedSetup); END; END ELSE BEGIN JobSchedSetup.LOCKTABLE; JobSchedSetup."Message Text" := STRSUBSTNO(Text020,JobSchedSetup."Object Type",JobSchedSetup."Object No."); ErrorHandling(JobSchedSetup); END; JobSchedSetup.MODIFY; UpdateStatus(JobSchedSetup.ID,JobSchedSetup."Message Text",FALSE); JobSchedMgtSetup.GET; COMMIT; END; UNTIL JobSchedSetup2.NEXT = 0; END;
But when it cames to run an object from the Job Scheduler doesn't run...... (RunObjectFromJobSched.RUN(JobSchedSetup) )
The object that runs in Job Scheduler is:
CREATE(WSVouchersWifi); SalesRecSetup.GET; SalesRecSetup.TESTFIELD("User Vouchers"); SalesRecSetup.TESTFIELD("Password Vouchers"); SalesRecSetup.TESTFIELD("ConnectionString NAV"); IF WSVouchersWifi.SetConfig(SalesRecSetup."User Vouchers", SalesRecSetup."Password Vouchers", SalesRecSetup."ConnectionString NAV") THEN BEGIN return := WSVouchersWifi.GetVouchers; END;and it's a codeunit single instance....
But if i go to the job scheduler and run the task, it runs perfectly
Can someone helps with this problem?
Junior Consultant & Developer in Dynamics NAV
"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"
Nirvana - Nevermind - Smells Like Teen Spirit
"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"
Nirvana - Nevermind - Smells Like Teen Spirit
0
Comments
-
Nobody knows what the problem?Junior Consultant & Developer in Dynamics NAV
"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"
Nirvana - Nevermind - Smells Like Teen Spirit0 -
Take a look at the Job Queue Log Entries. If there is at least an entry for the last scheduled time you can be sure that everything is fine from the setup point of view. And there should be an error message in the corresponding column(s)."Money is likewise the greatest chance and the greatest scourge of mankind."0
-
Why do you want to run a single instance codeunit in the Job Queue?"Money is likewise the greatest chance and the greatest scourge of mankind."0
-
einsTeIn.NET wrote:Take a look at the Job Queue Log Entries. If there is at least an entry for the last scheduled time you can be sure that everything is fine from the setup point of view. And there should be an error message in the corresponding column(s).
Its always the same:
The job scheduler stopped due to an error. The program has moved the job to the next run date and time.einsTeIn.NET wrote:Why do you want to run a single instance codeunit in the Job Queue?
But i tried without the single instance and the error maintains.......Junior Consultant & Developer in Dynamics NAV
"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"
Nirvana - Nevermind - Smells Like Teen Spirit0 -
Just to be sure, only codeunits that use an external Automation Server have to be single instance, e.g. if you want to use NAV Timer component or NAV MSMQ component.
On the quick I see two possibilities.
1. Test your solution with a higher version of NAV. Because of the new system function GETLASTERRORTEXT you will be able to see in the Job Queue Log Entries what exactly is the problem.
2. Try to start your NAS from command prompt with parameter "debug"."Money is likewise the greatest chance and the greatest scourge of mankind."0
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