Dear experts,
I am doing some data exchange addon with other system and this got to be executed in mid-night.
Since existing coding in Navision is necessary, I have to use codeunit inside Navision.
I am now using Windows Task Schedule to execute finsql.exe and using Codeunit #1 to automate the job. All runs fine as if I am logging in. BUT.... when finsql.exe is executed when Windows is NOT logging in, it seems Codeunit #1 is not being run and so, my codes are also not started.
Inside Task Schedule, I have added all the startup parameters like ntauthenatication, server, database, company. Yet, still in vain..... ](*,)
So, do you have any good idea on that? The key is, I have to use codeunit in Navision to finish my job.
Thanks in advance! [-o<
Rocopsa
0
Answers
Thanks very much! But, I am too fresh on NAS server and JobQueue, I failed to do so.
The NAS server is succesfully "Started" by NASMSnapIn.msc and JobQueue card has been made, yet, it seems the Job is not executed at the assigned time (Earliest Start Datetime)..... ](*,)
I have tried to look into many many posts there, but, cannot find the answer.....
Do you have any idea on this?
Thanks very much in advance!
Rocopsa
So, I will look for posts again for the solution. But, if you have any hints, please could you advise?
Thanks in advance!
Rocopsa
Since I am running out of time, I use Report in JOBQUEUE instead and inside the report, CODEUNIT.RUN(mycodeunit) to execute my codeunit.
Nevertheless, the JOBQUEUE sucessfully executed BUT...., my codeunit is not being run. Neither my machine is logged on or not.
So, I would like to ask is there any restriction inside the codeunit in JOBQUEUE? My codeunit is to export the whole Item master as a txt file to a specific path. It runs fine when I press the [RUN] button manually, txt files are created in the path. But NOT in JOBQUEUE.....
Please kindly advise! [-o<
Thanks very much!
Rocopsa
I got the reason.
It is because my codeunit contains Dataport. Eventhough I have given all the parameters (file path, sheet, etc) in the codeunit and then execute the dataport (that's why I only press the Run button and then the file will be exported), it is not being done by JOBQUEUE and NAS.
Then, I try to skip using dataport and export the data using OUTSTREAM, the same Jobqueue successfully exported out the txt file.
So, I feel dataport is not supported in Jobqueue eventhough all the necessary parameters are passed to it. Do you feel it is the fact? #-o
Thanks in advance!
Rocopsa
Thanks very much!!! Finally I can have the right way to go!!!
So, I will change all the codeunits avoiding dataport.
Thanks very much again!
Rocopsa