Navision 2009 NAS & JOB Sheduler Issue

balhinio
Member Posts: 28
Hi All,
I have a simple code unit (50351) the code is the following:
IF NOT EXISTS('C:\TemplatesRelance\NAS.txt') THEN
MyFile.CREATE('C:\TemplatesRelance\NAS.txt');
MyFile.WRITEMODE(TRUE);
MyFile.TEXTMODE := TRUE ;
MyFile.OPEN('C:\TemplatesRelance\NAS.txt');
MyFile.WRITE('TEST NAS'+FORMAT(CURRENTDATETIME));
MyFile.CLOSE;
I create a JOB Sheduler that run my code unit (50351). when I run the JOB using the form of Job Sheduler Management the code unit is running successfully. I want to run my JOB using NAS Service, so I have installed correctly the NAS with the correct configuration.
in the Start-up Parameter I put 'JOBQUEUE' as value. I start the NAS Service, but nothing happening.
Thanks for help.
I have a simple code unit (50351) the code is the following:
IF NOT EXISTS('C:\TemplatesRelance\NAS.txt') THEN
MyFile.CREATE('C:\TemplatesRelance\NAS.txt');
MyFile.WRITEMODE(TRUE);
MyFile.TEXTMODE := TRUE ;
MyFile.OPEN('C:\TemplatesRelance\NAS.txt');
MyFile.WRITE('TEST NAS'+FORMAT(CURRENTDATETIME));
MyFile.CLOSE;
I create a JOB Sheduler that run my code unit (50351). when I run the JOB using the form of Job Sheduler Management the code unit is running successfully. I want to run my JOB using NAS Service, so I have installed correctly the NAS with the correct configuration.
in the Start-up Parameter I put 'JOBQUEUE' as value. I start the NAS Service, but nothing happening.
Thanks for help.
0
Comments
-
Did you check the Job Queue Log Entry? is there any error in this log? Also check event viewer for NAS Services has configured successfully or not.0
-
The Job Queue Log Entry is empty. No error in the event viewer except the notification of NAS started or NAS Stoped.0
-
[Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
Check http://www.mibuso.com/howtoinfo.asp?FileID=15 to see if your NAS is installed correctly.
Some tests you can do: run command from dos WITHOUT the INSTALLASSERVICE-parameter. This way the NAS starts from DOS using the current Windows user (use RUNAS the change the user with which you run it.
You can also add the DEBUG-parameter. This starts the debugger and you can debug the NAS.
PS you have an error in your code if it doesn't exist, you CREATE the file and then OPEN it.: Probably you need something like this:MyFile.WRITEMODE(TRUE); MyFile.TEXTMODE := TRUE ; IF EXISTS('C:\TemplatesRelance\NAS.txt') THEN BEGIN MyFile.OPEN('C:\TemplatesRelance\NAS.txt'); END ELSE BEGIN MyFile.CREATE('C:\TemplatesRelance\NAS.txt'); END; MyFile.WRITE('TEST NAS'+FORMAT(CURRENTDATETIME)); MyFile.CLOSE;
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
What is the username under which NAS service is running? Also, is that user added to NAV database under "Windows Login" with relevant permissions?0
-
Hi all,
I found that I must add a "JOB Queue Entry" as a parameter in the OnRun function of the code unit. The Job is running now correctly.
But why I should add this parameter?
Thanks for all of you0
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