Determine if today is [day of week], then run action?

I made a workflow to download a number of comics. Some of them are published every day - let's call them subset A. Some of them are published only on Sundays - let's call them subset B. I'd like to make ONE workflow that:
1) checks what day of the week it is
2) if day is Sunday, get A + B
3) if day is any other day, get A
I already have a workflow that downloads the images, I just need to know if there's another action out there somewhere that checks the day of the week....

iBook G4, Mac OS X (10.4.5)

Posted on Mar 31, 2006 10:22 PM

Reply
2 replies

Mar 31, 2006 11:47 PM in response to astronoman

You can use an AppleScript action to check the day. Insert this in your workflow to determine which actions to run.

For example:

on run
set currentDay to weekday of (get current date)
if currentDay = Sunday then
return true
end if
return false
end run


So now this action will return true or false depending on whether the day is Sunday or not. You can use this as the decision as to whether or not to run the Sunday schedule. A similar script can check for weekdays (or, slightly easier, lack of weekend days):


on run
set currentDay to weekday of (get current date)
if currentDay ≠ Sunday and currentDay ≠ Saturday then
return true
end if
return false
end run

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Determine if today is [day of week], then run action?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.