Jump to content

Workflow that alternates by Day/Week


Recommended Posts

Posted

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

Posted
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.

Posted

Hey!

 

I unfortunatley just now realized, that the workflow sadly is not working properly, it is always defaulting to sunday. Do you have any ideas?

Posted (edited)
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
Posted

Hey, thanks for your reply!

 

I am german, but i set my Mac to english.

Unfortunately {date:e} and {date:c} dont work either, i tried Saturday in german aswell, very frustrating !

Posted (edited)

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
Posted
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. 

Posted
2 hours ago, Terminal said:

I could have swore text expansion worked in those fields.


I thought so, too. Variable expansion is, but snippet-style expansion isn't apparently. It's hard to know what's supported where.

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
×
×
  • Create New...