Running java code in a batch file if the SYSDATE is a SUNDAY
===

I have a java file TestOutput.java that we need to run only on Sundays. We also have a DOS based file copy command that need to run only on Sunday. How can this be achieved?

It has to do the following in the batch file:

    IF (DAY of sysdate=='SUNDAY')
        java TestOutput
        copy E:\Data\output1.psv S:\Output\output1.psv
    END IF

please help.

Thanks