December 16, 20214 yr Hi all. I searched and couldn't find what I thought was the correct answer. I'm trying to have my solution successfully run a scheduled server script on the first day of each month. I have the server script running and working, now its just time to have it only run once per month on the first day. If I add the following to an "If" statement at the beginning of the script, does this look right? Get ( CurrentDate ) = Date ( Month (Get ( CurrentDate ))-1;0; Year ( Get ( CurrentDate ) ) ) Thank you in advance for you time! Chris K.
December 16, 20214 yr 1 hour ago, CKonash said: does this look right? No. If you want the script to test if today is the first day of the month, then you should test for: Day ( Get ( CurrentDate ) ) = 1
December 16, 20214 yr Author Thank you so much Comment! I'm not sure why I always try to over complicate things. Your answers are always so simple I feel stupid!! Thanks again! Chris
December 19, 20214 yr I would be nice if the server schedule would have more of a cron type scheduling. Scripts that run daily just to see if today is the day I get to run. In one solution we had so many of these types of server scripts we tossed that all out and run one which goes to a 'scheduler' database iterates the records of other scripts to run if it meets the date criteria.
Create an account or sign in to comment