How to schedule a job queue using RTC

havhav Member Posts: 299
edited 2009-09-04 in NAV Three Tier
Hi All,
I have created a sample codeunit Test which prints a message.
I have setup a job queue for this codeunit and scheduled it for execution at every 2min interval.
In Classic Client.the codeunit gets scheduled at the required time and prints the message.
However when i observe the same in Role Tailored Client i do not see any messages getting printed.
I am not sure what extra i have to setup in order to see this message from RTC?

Is it possible to use job queue functionality in RTC?

Regards,
Hemant
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)

Answers

  • ara3nara3n Member Posts: 9,256
    You need to install NAS (Navision Application Server) with Startup parameter JOBQUEUE
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • havhav Member Posts: 299
    Yes i do have NAS installed on my machine with Startup Parameter as JOBQUEUE.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • Ian_Piddington10199Ian_Piddington10199 Member Posts: 167
    Where are yuo expecting the message to be printed?

    If NAS is handling the job queue then the message is goign to end up in the Event Log on the machine NAS is installed on.

    regards

    Ian
    Regards

    Ian
  • havhav Member Posts: 299
    If messages are seen in eventlog then atleast the Job Queue Log Entries page should list the job queue being executed whether succeeded or failed.
    When i open the Job Queue Log Entries page in RTC, i am unable to see the log entry.

    Any idea how to schedule the job queue in RTC?
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • Ian_Piddington10199Ian_Piddington10199 Member Posts: 167
    Not having done a great deal with the Job Scheduler under 2009 I am just guessing here but:

    The Job Queue Log Entries will be a table in NAV, somehow you need to write your code so that on an error it updates this table.

    So a question then, you original said
    hav wrote:
    I have created a sample codeunit Test which prints a message.
    I have setup a job queue for this codeunit and scheduled it for execution at every 2min interval.
    In Classic Client.the codeunit gets scheduled at the required time and prints the message.
    When the message prints in Classic where does it print to, is it just poping a message box on screen or is it also writting to the log?

    Ian
    Regards

    Ian
  • havhav Member Posts: 299
    The message is popping up on the screen.
    I do not see any entry in the event log.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • ara3nara3n Member Posts: 9,256
    If the message is poping on the screen, it means you are not running NAS, you are running Job queue on your client.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • havhav Member Posts: 299
    The NAS is started when i start the system. I can see both my services : <machine name>-CLASSIC and <machine name>-SQL started in Control Panel > Administration > Services.

    I have even tried running the service using NAS MMC. But still i face the same problem.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • ara3nara3n Member Posts: 9,256
    Please Open the EventLog and read the messages. Just because NAS is running doesn't mean it is connected to the SQL server.
    Again Please read the eventlog. And paste what NAS writes to the event log in here.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • havhav Member Posts: 299
    Below is pic of Windows Services


    This is my eventlog


    This is the warning message


    Let me know how to connect NAS to SQL Server.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • havhav Member Posts: 299
    This is the another warning message i get.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • DenSterDenSter Member Posts: 8,307
    The message "user ID and password are invalid" doesn't give you any idea?

    NAS is basically a regular NAV client that runs as a Windows service. As such, it needs to be set up with a Windows login, which you can see under the 'log on' tab. In there, you will need to specify an existing Windows user that has been set up in NAV with permissions for the task that NAS executes.

    Browse your product CD, and look for a folder called 'doc'. In there is a PDF called 'w1w1atas.pdf', which will tell you everything there is to know about how to set up NAS.
  • havhav Member Posts: 299
    Below is the Log On tab properties


    I do have setup <domainname>\<Windows user> in my Tools > Security > Windows Login in NAV 2009 Classic Client and have also assigned the role as SUPER.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • DenSterDenSter Member Posts: 8,307
    The networkservice account is a system account, and I would personally not use it for NAS. Create a new Windows account, specifically for NAS, set it up as a user in NAV, with the right permissions. Define that account in the log on tab of the NAS service, and you should be all set.

    Did you find that document I told you about? Did you read it? It has all the information about how to set up a user for NAS.
  • DenSterDenSter Member Posts: 8,307
    hav wrote:
    This is the another warning message i get.
    Do you have a C/SIDE database server set up? If not, you need to disable that service altogether.
  • havhav Member Posts: 299
    DenSter wrote:
    The networkservice account is a system account, and I would personally not use it for NAS. Create a new Windows account, specifically for NAS, set it up as a user in NAV, with the right permissions. Define that account in the log on tab of the NAS service, and you should be all set.
    Yes you are right. =D>
    I changed log on account for the NAS service from "NT Authority\Network Service" to current Windows login account as "<domain>\<user>" and also defined the same user under Windows login in NAV database with "SUPER" role.
    I restarted my machine and the NAS service started automatically.
    I can now see the jobqueue-Test getting executed at every 2min interval and that the messages are printed in the event log.


    The NAS service is basically a Windows service so any jobqueue that is scheduled for execution will execute automatically without the need for running either Classic Client or Role Tailored Client.

    Thanks a lot to all concerned. :D
    DenSter wrote:
    Did you find that document I told you about? Did you read it? It has all the information about how to set up a user for NAS.
    Yes i read it twice to understand NAS fundamentals.
    Thank you very much.

    Regards,
    Hemant
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • havhav Member Posts: 299
    ara3n wrote:
    If the message is poping on the screen, it means you are not running NAS, you are running Job queue on your client.
    Yes the message is printed in the event log.
    Below are the pics of the message from event log




    Once again thanks to all concerned. :D
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • DenSterDenSter Member Posts: 8,307
    Good to see you figured it out hav =D> \:D/
    Feels good to see your own message come into the event log doesn't it :mrgreen:
Sign In or Register to comment.