scheduled script is running every hour and I need ...
# suitescript
k
scheduled script is running every hour and I need to send email at specific time in the scheduled script
u
Copy code
if(new Date().getHours() == 23)
      sendEmail();
e
^ unless the account isn't on the CST datacenter
or the company timezone isn't set to CST
I don't have any context at all on what your script is doing, but I'd probably separate them into two separate scripts. The one running every hour would create/update records, probably custom, with all the required data, then the Scheduled Script just runs once, searches the requisite data to compile and send the email.