Schedule a ProcessFlow to run every two weeks

 5 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
agersh
Veteran Member
Posts: 81
Veteran Member
    Has come across this situation? I have a PF that needs to run on Monday every two weeks. I know that using the PF Scheduler I can schedule the PF to run ever Monday (weekly) but not every two weeks (biweekly). Is it possible to run a PF from a Windows command prompt? My thoughts are that I could use the Windows Task Scheduler to run the PF every Monday biweekly.
    M Graham
    Veteran Member
    Posts: 32
    Veteran Member
      To accommodate a bi-monthly PF schedule, we created 2 entries on the PF Scheduler, e.g., one that runs monthly on the 1st Monday of the month, and one that runs monthly on the 3rd Monday of the month.
      ________________________________________
      Marcy Graham, MBA, PMP | Sr. System Analyst
      Electric Reliability Council of Texas | O: 512-248-3895 | C: 512-925-3334 | mgraham@ercot.com

      From: forums-bpm-pflow@lawsonguru.com [mailto:forums-bpm-pflow@lawsonguru.com]
      Sent: Wednesday, September 28, 2011 1:53 PM
      To: Graham, Marcy
      Subject: Schedule a ProcessFlow to run every two weeks [00009101:00000000]

      [Image removed by sender. LawsonGuru.com Logo]<https://www.lawsonguru.com/>
      Lawson ProcessFlow Forum Notification
      A message was posted to a thread you are tracking.
      Schedule a ProcessFlow to run every two weeks

      Posted by: agersh
      09/28/2011 12:43 PM

      Has come across this situation? I have a PF that needs to run on Monday every two weeks. I know that using the PF Scheduler I can schedule the PF to run ever Monday (weekly) but not every two weeks (biweekly). Is it possible to run a PF from a Windows command prompt? My thoughts are that I could use the Windows Task Scheduler to run the PF every Monday biweekly.

      ________________________________

      To view the complete thread and reply via your browser, please visit:
      https://www.lawsonguru.co...run-every-two-weeks/

      You were sent this email because you opted to receive email notifications when someone posted and/or responded to a message on this forum.
      To unsubscribe to this thread please visit your user profile page and change your subscription options.

      Thank you,
      LawsonGuru.com
      Attachments
      Shane Jones
      Veteran Member
      Posts: 460
      Veteran Member
        I think you will have issues running the first and third monday because it will have trouble any time the monday falls on the 31st.   When I looked at the calendar you will miss a week in October.   For many flows that would not be an issue but if it is you might be able to do something like this:

        I did a fileaccess node and I just have a file in the processflow pfrepository folder that I access and change in the flow to say yes or no....   At the beginning of the flow I look at the file and if the content says YES the flow branches to run the parts of the flow I need - including a node where I change the value to NO.   If the variable says NO I skip the content and just change the value to a YES.   That way next time the flow runs it will see a YES and run the flow...    (The flow runs EVERY week it just determines if it should just end immediately or if it should do all of the nodes.)

        I did the above before the advent of BS06...    BS06 maintains your payroll schedule.   If you use this screen and you have a biweekly payroll you could just look at the table that holds the BS06 info and determine if the flow should proceed or end based on the biweekly payroll schedule in your BS06...

        My solution runs the flow each week it just decides if it should proceed or end right at the beginning of the flow.   (I am attaching some screenshots.)


        (I always put a branch at the beginning to termporarily disable a flow without having to change the schedule)
        ** * Just look at the nodes I have red lines to... * **
        Shane Jones
        Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
        Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
        ** Teach others to fish...
        Sam Simpson
        Veteran Member
        Posts: 239
        Veteran Member
          Another way of running PF exactly every two weeks (BI-Weekly) is to schedule a job(recdef) whose only function is to call a script(token). This script will only create a blank or bogus file that ScanfileClient can detect(trigger). The ScanFileClient then calls the flow.
          John Henley
          Posts: 3353
            Another option is to schedule every week and combine some JavaScript with a branch node and only execute the code on desired weeks.
            >
            Thanks for using the LawsonGuru.com forums!
            John
            Shane Jones
            Veteran Member
            Posts: 460
            Veteran Member

              Had a thought on this one in the car this morning...   This is not very elegant but it would work - just might need more regular maintenance of the flow content.

              Schedule the flow weekly on Mondays, then determine the dmedate, and add a branch at the beginning that compares the current date to the dates you want to run on...   (You would just need to add dates in the future but you could just reminder yourself to update the flow once a year with the new run dates.)

              datenow =10/10/2011 ||
              datenow =10/24/2011 ||
              datenow =11/7/2011 ||
              datenow =11/21/2011 ||
              datenow =12/5/2011 ||
              datenow =12/19/2011 ||
              datenow =1/2/2012 ||
              datenow =1/16/2012 ||
              datenow =1/30/2012 ||
              datenow =2/13/2012 ||
              datenow =2/27/2012 ||
              datenow =3/12/2012 ||
              datenow =3/26/2012 ||
              datenow =4/9/2012

              Shane Jones
              Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
              Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
              ** Teach others to fish...