Jesthe11

Run code on certain day of the week

2 posts in this topic

I am currently trying to create an updater for my program by grabbing the link and installing them locally to a usb, so I can run the files right off the usb

In this code lies my issue

If @WDAY > 2 and @WDAY < 4  Then
    MsgBox($MB_OK, "", "Test")
    UpdateTues()
ElseIf @WDAY > 4 and @WDAY < 6 Then
    UpdateThurs()
Else
    Exit
EndIf

The rest of the code is just inetget calls followed by creating folders and such on the USB

Even if I coded it as @WDAY == 5 (which is Thursday) it still did not run the program only caught my else statement and exited the updater

So, I am looking to make UpdateTues() run on Tuesdays, and UpdateThurs() run on Thrusdays

Thanks

Share this post


Link to post
Share on other sites



Well I prematurely posted this question as I have solved my issue

In stead of using == or < or > I just used, the single equals sign

If @WDAY = 3  Then
    UpdateTues()
ElseIf @WDAY = 6 Then
    UpdateThurs()
Else
    Exit
EndIf

And now it works 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now