web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

run a job monthly

keoma Profile Picture keoma 32,729

jobs can be run using job queues. in the job queue entry card you can set a codeunit or a report to run periodically. periods can: minutes to days. it is also possible to run a job once a week.

not possible: run a job monthly.

here are some solutions.

the simple solution:
goto page “job queue entry card” and set “no. of minutes between runs” to a value like 43200 (= 60 * 24 * 30). that is the minute value for an average month. the exact average value is 60 * 24 * 365,25 / 12 = 43830 min.

recurr-job

advanced solution:
edit cu 448 and change fct. CalcNextRunTimeForRecurringJob according to your special needs. There change the calc. formula for NewRunDateTime.

cu-448-nextjobrun

to run a job monthly set “No. of Minutes between Runs” to 0.
create new global var. Monthly: Boolean.

change fct. CalcRunTimeForRecurringJob:

IF Found THEN
NewRunDateTime := CREATEDATETIME(DT2DATE(StartingDateTime) + NoOfDays,NewRunTime);

IF Monthly THEN BEGIN
LastOfMonth := CALCDATE (‘CM’, DT2DATE(StartingDateTime));
NewRunDateTime := CREATEDATETIME(LastOfMonth, NewRunTime);
END;

new fct. RunMonthly(monthlyPar: Boolean)
Monthly := monthlyPar;


Filed under: Uncategorized

Comments

*This post is locked for comments