How to run a NetSuite scheduled script at every month end-CarlZeng
Background Some times we need trigger a task at every month end, the last day of every month, i.e. cache business data. Run a NetSuite scheduled scrip
Background
Some times we need trigger a task at every month end, the last day of every month, i.e. cache business data.
Run a NetSuite scheduled script at every month end, can’t be achieved by setup Script Deployment > Schedule:
SINGLE EVENT
X DAILY EVENT
X Repeat every 1 day(s)
WEEKLY EVENT
Repeat every weekday
MONTHLY EVENT
YEARLY EVENT
START DATE 2/20/2019
START TIME6:00 pm
REPEAT
END BY
NO END DATE
When you hit ‘Monthly Event’, the option can’t locate to the LAST day of every month.
Day of every month(s)
The
of every month(s)
Steps:
1. Setup Script Deployment > Schedule to run for Every Day, I.e. 6PM (as above table)
2. Driven by saved search schedule can use this criteria to return result ONLY on last day of every month:
Formula (Numeric)
CASE TO_CHAR({today},’MM/DD/YYYY’) WHEN TO_CHAR(LAST_DAY({today}),’MM/DD/YYYY’) THEN 1 ELSE 0 END
Make this criteria equal to 1, will achieved results at the end of every month.