82316

Executing Workflow using AWS SWF Cron

Question:

I want to execute my workflow at a specified time daily(say at 10 am JST) using AWS SWF cron. In the sample program in AWS SDK I find that activities can be scheduled using SWF cron. But how to schedule a workflow using AWS SWF cron. I am very much new to this SWF cron. Any suggestion is highly appreciated

<strong>Activities Class:</strong>

public class SampleActivitiesImpl implements SampleActivities{ @Override public Integer testAct1() { System.out.println("Activity 1 ---->Start"); return 1; } @Override public Integer testAct2() { System.out.println("Activity 2 ---->Start"); return 1; } }

<strong>Workflow Class:</strong>

public class MyWorkflowImpl implements MyWorkflow{ private SampleActivitiesClient client = new SampleActivitiesClientImpl(); @Override public void executeActivity() { client.testAct1(); client.testAct2(); } }

Answer1:

You don't schedule the cron workflow as it should be always running. BTW your sample code is just going to execute both activities in parallel without any scheduling.

Answer2:

Look into scheduled events in Lambda. Will be the easiest way to achieve that.

Recommend

  • Easy way to serialize/deserialize public enums?
  • EJB stateless - Private members initialisation
  • Programmatically auto-power on the phone
  • Hudson - different build targets for different triggers
  • Should ScheduledExecutorService.scheduleAt* methods re-schedule tasks if the task throws RuntimeExce
  • angularJS library for drawing bar charts with logarithmic scale
  • how to handle large size of update query in mysql with laravel
  • Magento invalid cron expression
  • How to auto update a record in database?
  • QueryBuilder/Doctrine Select join groupby
  • How to create list with carousel effect in android
  • working with bool value from View in javascript
  • Emulate User Activity
  • Will a method annotated with @PostConstruct be guaranteed to execute prior to a method with @Schedul
  • How to show a specific VC , more like navigate to a stack of VC
  • How many percent of the tweets does twitter sample API give?
  • Team Foundation Server 2015 vs. Bitbucket Server (Stash)
  • Adding independent aspx/asmx pages into DotNetNuke
  • Lock Horizontal View
  • how do i write assembly code from c#?
  • How can I set a binding to a Combox in a UserControl?
  • Sort List of Strings By Version
  • Problems compiling files using JOGL
  • Parsing a CSV string while ignoring commas inside the individual columns
  • Swing - Get new component under mouseReleased
  • MVC3 Razor - ListBox pre-select not working
  • Set the selected item in dropdownlist in MVC3
  • ilmerge with a PFX file
  • Spring Data JPA custom method causing PropertyReferenceException
  • Can I display google adwords (AdView) in javafx on android
  • Validaiting emails with Net.Mail MailAddress
  • sending/ receiving email in Java
  • Cannot Parse HTML Data Using Android / JSOUP
  • JTable with a ScrollPane misbehaving
  • Java static initializers and reflection
  • unknown Exception android
  • Observable and ngFor in Angular 2
  • failed to connect to specific WiFi in android programmatically
  • Unable to use reactive element in my shiny app
  • How can I use threading to 'tick' a timer to be accessed by other threads?