Jump to content

Workflow that alternates by Day/Week


Recommended Posts

Hello beautiful people,

 

i would like to launch either launch my Android or my iOS Simulator, depending on the day/week.

 

Is there a way so that I can switch between the two paths of starting either simulator  by day or week?

 

(Reason being, that I write code in React Native which is cross plattform, and I often forget checking the Android side of things, so I would like to automate that)

 

Thanks in advance!

 

Greetings

Fred

Link to post
19 minutes ago, fredyonge said:

Hello beautiful people,

 

i would like to launch either launch my Android or my iOS Simulator, depending on the day/week.

 

Is there a way so that I can switch between the two paths of starting either simulator  by day or week?

 

(Reason being, that I write code in React Native which is cross plattform, and I often forget checking the Android side of things, so I would like to automate that)

 

Thanks in advance!

 

Greetings

Fred

 

To understand fully, something like ?

 

    Monday = Launch iOS Simulator

    Tuesday = Launch iOS Simulator

    Wednesday = Launch Android

    Thursday = Launch Android

    Friday = Launch iOS Simulator

 

 

if that is the case, you could write a script that checks the day of the week and then launches said value. You would still need to trigger it via a hotkey or keyword type trigger. If you want it automated, then you need to look at something other than Alfred. As Alfred is a launch vs a task scheduler.

Link to post
51 minutes ago, fredyonge said:

Do you have any ideas?

 

Presumably, your system isn't set to English. The workflow uses a placeholder to generate the name of the current day, which will be in the language your OS is set to, but tests it against the English names. Edit the workflow to change the day names to the right ones for your language.

 

More generally, the workflow should use {date:e} or {date:c} instead of {date:EEEE} to make it locale-independent.

 

@Terminal Do you think you could upload such workflows to somewhere more permanent that gofile.io? It's very common that someone comes to a thread months or years later and finds such a workflow, which is just what they're looking for, but it's long gone because it was only uploaded to a temporary URL.

Edited by deanishe
Link to post

My bad. I should have tested it instead of guessing…

 

Try this version.

 

The problem is actually that Alfred doesn't expand placeholders in the field Terminal used them in.

 

{date:e} and {date:c} won't work without other changes. But they return the day as a number, so they're locale-independent.

Edited by deanishe
Link to post
20 hours ago, deanishe said:

 

Presumably, your system isn't set to English. The workflow uses a placeholder to generate the name of the current day, which will be in the language your OS is set to, but tests it against the English names. Edit the workflow to change the day names to the right ones for your language.

 

More generally, the workflow should use {date:e} or {date:c} instead of {date:EEEE} to make it locale-independent.

 

@Terminal Do you think you could upload such workflows to somewhere more permanent that gofile.io? It's very common that someone comes to a thread months or years later and finds such a workflow, which is just what they're looking for, but it's long gone because it was only uploaded to a temporary URL.


I’ll use github or Dropbox from now on. 
 

I could have swore text expansion worked in those fields. How odd, I wonder why I had though that. Thanks for expanding on this and providing a solution. 

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...