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.
edit cu 448 and change fct. CalcNextRunTimeForRecurringJob according to your special needs. There change the calc. formula for NewRunDateTime.
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);
new fct. RunMonthly(monthlyPar: Boolean)
Monthly := monthlyPar;