to automatically run a codeunit

Hi All,

I want a codeunit to run automatically at certain time intervals everyday or once every week.is there any procedure in nav to achieve that?i preferably would not like to run or start nav(from the program files) for that but without starting nav.

Hi,

I would setup a NAS, and have it run a job in the Jobqueue.
If you search this site for those 2 words, i’m pretty sure you’ll find several threads on the issue.

You can use Job Queues…

Administrator–>Application Setup–>Job Queue

i want to know how to write NASstart.cmd and NASstop.cmd files.in that files what to write in appservername,servername,startupparameter below

nas.exe appservername=TheNasName, NETTYPE=TCP, servername=NAVISION,
company=“Cronus India Ltd.”, nettype=tcp, startupparameter=”THEPARAMETER”,
objectcache=40000, installasservice

do i have to compulsorily run the above cmd file and start the nas server in order to execute job queues.

I use Windows Scheduled Task to fire it off. Point it to a Navision form and inside the form it fires the report off.

When the form opens up in the On Open Form Section

REPORT.RUNMODAL(50152, FALSE, FALSE);

On Close Form Section

CloseIt.RUN();