How to run a NetSuite scheduled script at every month end

本文介绍了一种在月末最后一天自动运行NetSuite计划脚本的方法,通过设置每日运行并结合保存的搜索调度,利用公式筛选出每月最后一天进行特定业务数据缓存任务。

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:

 
 
 X    Repeat every 1   day(s)
 
 
     Repeat every weekday
START DATE 2/20/2019
 
START TIME6:00 pm
 

When you hit 'Monthly Event', the option can't locate to the LAST day of every month.

 Day  of every  month(s)
 
  The 
More Options
 
More Options
 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.

 

转载于:https://www.cnblogs.com/backuper/p/10407556.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值