Scheduling a task to run at the end of every month. (Windows Server 2003 - Scheduled Tasks)

I need to schedule a task to run on the last night of each month, on a Windows 2003 Server.

I see that you can schedule it to run on the "first or last Mon-Fri", or even on the nth day of each month - but, not how to get it to run on the last day (regardless of day of the week or number).

Thanks in advance.

Note: I did check "How do you schedule tasks in Windows?", etc...

2 Answers

  1. Loren- Reply


    I do it a little differently - I run one task every day but since the task is in vbscript - I do this:

    DIM datecur, datefut
    datecur = DATEPART("m",NOW())
    datefut = DATEPART("m",NOW()+1)
    If (datecur <> datefut) then
    'insert code you want to run here
    end if

    Simple and it works - hope this helps someone

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>