How to schedule in Power Automate Desktop WITHOUT Power Automate Cloud or Premium license)

Поделиться
HTML-код
  • Опубликовано: 24 окт 2024
  • Please watch this ONE Step Hack first. It's much simpler: • One STEP hack to sched...
    Power Automate Desktop - Scheduler Hack - How to "Hack" PAD to Schedule workflows using Javascript.
    Special thanks to Gozz Gozzilla for highlighting the bug in my code for Run Javascript 2 (within the loop). Please see below for the correct codes.
    How to schedule in Power Automate Desktop WITHOUT Power Automate Cloud or Premium license)
    Please help me to help other people just like you by subscribing to my channel and like the video if you think it's helpful.
    You can donate to support my channel here (No refunds):- www.paypal.me/...
    Run Javascript 1
    var StartDateTime = new Date(%UserInput%).getTime();
    var CurrentDateTime = new Date().getTime();
    var Value_StartDateTime = new Number(StartDateTime);
    var Value_CurrentDateTime = new Number (CurrentDateTime);
    var WaitTime = (Value_StartDateTime - Value_CurrentDateTime)/1000;
    WScript.echo(WaitTime);
    Run Javascript 2 (within the loop)
    var StartDateTime = new Date(%UserInput%).getTime();
    var CurrentDateTime = new Date().getTime();
    var Value_StartDateTime = new Number(StartDateTime);
    var Value_CurrentDateTime = new Number (CurrentDateTime);
    var WaitTime = ((Value_StartDateTime+%LoopIndex%*(24*60*60*1000)) - Value_CurrentDateTime)/1000;
    WScript.echo(WaitTime);

Комментарии • 65

  • @PowerAutomator
    @PowerAutomator  2 года назад +2

    There are two hacks available to schedule workflows without any license:-
    1) Short way (one step hack): ruclips.net/video/ztHCHQPb1ko/видео.html
    2) Long way: ruclips.net/video/FPjBBgIOwZU/видео.html
    3) Multiple workflows using timetable in Excel: ruclips.net/video/TpWS9XeL38Q/видео.html
    If they help you, please give the video a like and subscribe to the channel. ;)

  • @PowerAutomator
    @PowerAutomator  2 года назад

    Please watch this ONE Step Hack first. It's much simpler: ruclips.net/video/ztHCHQPb1ko/видео.html
    Special thanks to @Gozz Gozzilla for pointing out a bug in my Javascript 2 (within the loop). Please see corrected code in description.
    This channel only have 50 subscribers. If this video helps you, please remember to subscribe so I can help more people. I need to get 1000 subscribers :). Thank you!
    You can buy me coffee or tip me here (No refunds):- www.paypal.me/excalteryx

  • @GarethDoherty1985
    @GarethDoherty1985 2 года назад +1

    Came here from your reply on my comment on the Power Automate Desktop March 22 Update Blog. All looks good. Liked and subscribed.
    I little feedback for you videos, try to have some sort of 1-2 minute "outro" segment because RUclips buts on screen there recommendations for the next video at the end and it obscures the view of what you were trying to show 👍

    • @PowerAutomator
      @PowerAutomator  2 года назад +1

      Thanks for the feedback. Much appreciated! I will do a longer outro. Thanks for staying all the way to the end of the video. Please let me know if you have any further automation issues as generally my viewers give me the best ideas on what video I want to make next. Win win :)

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Hi Gareth, if it's helpful for you, I have just created a video for multiple workflows using timetable in Excel: ruclips.net/video/TpWS9XeL38Q/видео.html

  • @arwasko
    @arwasko Год назад +1

    WaitTime is not a variable produced for the first javascript but the script is exactly what you have in the description. I see others with the same issue but no fix was documented in the comments

    • @PowerAutomator
      @PowerAutomator  Год назад

      Thanks for the comment and welcome! Are you able to elaborate further what the issue is? Cheers!

  • @jaredyong113
    @jaredyong113 Год назад +1

    This works perfectly fine for me! I tested it to run every minute by changing 24*60*60*1000 to 1*1*60*1000. it works even on lock screen.
    but @powerAutomator just wondering if we could run 2nd flow with different loop timing? for eg. 1st one runs Daily, 2nd one runs Weekly. THANKS!

    • @PowerAutomator
      @PowerAutomator  Год назад +1

      I think logically is possible. Just build your daily loop within a weekly loop then put the weekly task just before the daily loop

  • @luisfmts
    @luisfmts 2 года назад +3

    Sorry but it seems it's not scheduled, it's delayed... you can also create a subflow using the "wait" snippets already built in the application, so no need for an external script for waiting time...

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Maybe you will like this one better ruclips.net/video/ztHCHQPb1ko/видео.html

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Or this one ruclips.net/video/TpWS9XeL38Q/видео.html

  • @abenteuerland5350
    @abenteuerland5350 2 года назад +1

    Thank you for the video. But I have a question; your format of DateTime doesn't run on my computer. Is it really 'Jan 5 17:50 2022'. If I use this format my Flow runs into a fault. Thank you for any answer

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Thank you for your support. You might be in a different locale. So try to change the format. docs.oracle.com/cd/E19455-01/806-0169/overview-7/index.html
      docs.oracle.com/cd/E19455-01/806-0169/overview-6/index.html

  • @alasdairnott2919
    @alasdairnott2919 2 года назад +1

    This is working great, thanks!
    Is it possible to run for 5 days, pause for 2 days and then run again for 5? So basically run on weekdays and pause on weekends?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Hi mate, thanks for the comment. gearupwindows.com/how-to-show-day-of-week-in-windows-11-10-taskbar-clock/
      Add the day in the time on the window task bar then include a If statement in the loop. If screen has Sat or Sun, go to back to beginning of loop somewhere. Have a try. Theoretically is possible. I will try it when I get some time.

    • @alasdairnott2919
      @alasdairnott2919 2 года назад +1

      Thanks for your quick reply! I’m away next week but will try your suggestions when I’m back

    • @ethanmcnemar8814
      @ethanmcnemar8814 2 года назад +2

      @@PowerAutomator Actually wouldn't creating a new Variable and doing a switch based on that variable work too? Via
      1.)Get Current Date and Time
      2.) Set Variable WeekdayName {%CurrentDateTime.DayOfWeek%}
      3.) Switch on WeekdayName
      4.) Case #1 if WeekDayName Contains 'Saturday' (ignore case)
      4.a) Stop Flow successfully
      5.) Case #2 if WeekDayName Contains 'Saturday' (ignore case)
      5.a) Stop Flow successfully
      6.) Default Case Action - Catches all other name days (Monday through Friday)
      6.a) (Run Main Flow)

    • @PowerAutomator
      @PowerAutomator  2 года назад +1

      Yeah I think will work much better using cases. Thank you for writing those up! Hopefully someone can try it out

    • @alasdairnott2919
      @alasdairnott2919 2 года назад

      @@ethanmcnemar8814 Thanks for this. At what step should I add your variable to the desktop flow?

  • @kelvinmichael1959
    @kelvinmichael1959 Год назад +1

    hi - this tool works perfectly and i sent you a cup of coffee :-)

    • @PowerAutomator
      @PowerAutomator  Год назад

      Thank you but I didn't see the coffee. Lol. Did you use the PayPal link www.paypal.com/paypalme/excalteryx?

    • @kelvinmichael1959
      @kelvinmichael1959 Год назад

      @@PowerAutomator yes

  • @ksunilksk2768
    @ksunilksk2768 Год назад +1

    Hello, this is great tip for scheduling. But once I schedule my flow to run daily, and turn off my laptop, still this works?

    • @PowerAutomator
      @PowerAutomator  Год назад

      Won't work anymore. The screen cannot be locked too. Screen saver need to be turned off too.

  • @senozk6783
    @senozk6783 2 года назад

    Good job, thanks! Loop and flow can run at background? Otherwise, pc should be kept running and switched on for whole period of the loop and flow?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Yeah pc need to be kept running unfortunately.

    • @PowerAutomator
      @PowerAutomator  2 года назад +1

      Hi Sen Ozk, if it's helpful for you, I have just created a video for multiple workflows using timetable in Excel: ruclips.net/video/TpWS9XeL38Q/видео.html

  • @vincentkoh3313
    @vincentkoh3313 3 месяца назад +1

    thank you for sharing

  • @SerdarYazicioglu
    @SerdarYazicioglu Год назад

    @PowerAutomator
    Hello, thanks for the guide. I recreated it exactly as you described. Unfortunately, it does not jump to the loop after the waiting time has expired. What could be the problem? How can I solve it? I would appreciate your help.

  • @marcuscato1704
    @marcuscato1704 2 года назад +1

    Great! Thank you very much!

  • @ndacadet1
    @ndacadet1 2 года назад +1

    Thanks so much . Very helpful video .

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Thank you for subscribing! Helps me a lot too. Feel free to let me know if you need me to make other videos to help you

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Hi d k, if it's helpful for you, I have just created a video for multiple workflows using timetable in Excel: ruclips.net/video/TpWS9XeL38Q/видео.html

  • @bsteve3271
    @bsteve3271 2 года назад

    Any idea why I'm getting the following error message? "Parameter 'Text to convert': Variable 'WaitTime' doesn't exist". Perhaps the system datetime format differs on my PC?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Does your Run Javascript has the waittime variable?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Hi Steve, if it's helpful for you, I have just created a video for multiple workflows using timetable in Excel: ruclips.net/video/TpWS9XeL38Q/видео.html

  • @RajisRavi
    @RajisRavi 2 года назад +1

    Hi, can we schedule a flow for specific days not daily?

    • @RajisRavi
      @RajisRavi 2 года назад +1

      Pls help

    • @PowerAutomator
      @PowerAutomator  2 года назад

      You can make power automate desktop to wait for text of the day (I.e. Thu) to appear at bottom right of the screen. You need to set windows up to show the day. www.top-password.com/blog/show-day-of-week-in-windows-10-taskbar-clock/

    • @RajisRavi
      @RajisRavi 2 года назад +1

      @@PowerAutomator Thank you

  • @gozzgozzilla1787
    @gozzgozzilla1787 2 года назад

    First Thanks for this VDO, it help me a lot. However I got problem after the first loop passed then the second loop always got error said " Timeout values can only be in the range 0 to 2147483 seconds" and the variable WaitTime show -282.826....Could you pls suggest ?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      I think you might have keyed in a time that has already passed. Key in a future time. Maybe your month and day got in the reverse order.

    • @gozzgozzilla1787
      @gozzgozzilla1787 2 года назад +1

      @@PowerAutomator in the JavaScript, each loop should I add loopindex to be Value_startDate Time + loopIndex *(24*69*60*1000) - Value_CurrentDateTime)/1000 because Value_StartDateTime should increase 1 day every loop, right?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      @@gozzgozzilla1787 wow you are right. My code is buggy. There's a small typo in your code - 69 which should be 60. Also you need to add %LoopIndex%. The code for the line should be like this:
      var WaitTime = ((Value_StartDateTime+%LoopIndex%*(24*60*60*1000)) - Value_CurrentDateTime)/1000;
      Please let us all know how you go! Cheers mate

    • @gozzgozzilla1787
      @gozzgozzilla1787 2 года назад +1

      @@PowerAutomator After modified Javascript and let it run for several days, everything is ok, working fine now...Thanks
      BTW, can we have Power Automate refresh data for Power BI desktop file?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      @@gozzgozzilla1787 You are the champion! You are the first subscriber who told me that the process can be run several days non-stop! lol. On your Power BI desktop question, can you have a look at this video first ruclips.net/video/NCQQMkiD668/видео.html Then you can add the steps to ask Power Automate to click on the UI Elements of Home then Refresh button. Let me know if it doesn't work for you.

  • @asmuru78anand25
    @asmuru78anand25 2 года назад

    Variable produced Wait time not show, how to get it, please advise.

    • @PowerAutomator
      @PowerAutomator  2 года назад

      You need to output to WaitTime (not "Wait time" with a space) in step 3. Please remember to subscribe. Thank you :)

    • @SerdarYazicioglu
      @SerdarYazicioglu Год назад

      It works, I just recreated it
      The following is not shown in the video
      > Variables produced (blue text) Value_WaitTime
      Click on the blue text Produced Variables and enter "WaitTime or Value_WaitTime" there, then it works.

  • @renehasp
    @renehasp 2 года назад

    How can we apply the same method to run every 1 hour?

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Hi Rene, get rid of step 8 and 9. Then in step 10 type in 216000 ( it's an hour in seconds) . Please don't forget to like and subscribe :). Cheers

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Hi Rene, if it's helpful for you, I have just created a video for multiple workflows using timetable in Excel: ruclips.net/video/TpWS9XeL38Q/видео.html

  • @jamesbassey417
    @jamesbassey417 2 года назад +1

    How can i make this script run every three minutes by the way ure a genius

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Thank you mam. Just use Wait functions 180 seconds. Please remember to subscribe! :)

    • @jamesbassey417
      @jamesbassey417 2 года назад

      @@PowerAutomator where exactly do i put the wait function

    • @PowerAutomator
      @PowerAutomator  2 года назад

      In between loop, right after the start of a loop, then use the wait function

    • @jamesbassey417
      @jamesbassey417 2 года назад +1

      @@PowerAutomator thank you i have been able to make it work perfectly kudos boss

    • @PowerAutomator
      @PowerAutomator  2 года назад

      Wow you are amazing! :)

  • @reanalytics1863
    @reanalytics1863 Год назад

    Does this still work in 2023,
    I tried running the code and got the following error
    Can't convert text '' into a valid number (text provided is either in a non-recognizable format or contains too many characters).
    Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Can't convert text '' into a valid number (text provided is either in a non-recognizable format or contains too many characters).
    at Microsoft.Flow.RPA.Desktop.Modules.Text.Actions.ConvertTextToNumberAction.Execute(ActionContext context)
    at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
    can any one help?

    • @SerdarYazicioglu
      @SerdarYazicioglu Год назад

      It works, I just recreated it
      The following is not shown in the video
      > Variables produced (blue text) Value_WaitTime
      Click on the blue text Produced Variables and enter "WaitTime or Value_WaitTime" there, then it works.