cron

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 4 Imported by: 2

README

This sample demonstrates how to setup cron based workflow.

Steps to run this sample:

  1. You need a Temporal service running. See README.md for more details.
  2. Run
go run cron/worker/main.go 

to start worker for cron workflow. 3) Run

go run cron/starter/main.go

to start workflow with cron expression scheduled to run every minute.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SampleCronActivity

func SampleCronActivity(ctx context.Context, beginTime, endTime time.Time) error

Cron sample job activity.

Types

type SampleCronResult

type SampleCronResult struct {
	EndTime time.Time
}

SampleCronResult used to return data from one cron run to next cron run.

func SampleCronWorkflow

func SampleCronWorkflow(ctx workflow.Context) (*SampleCronResult, error)

SampleCronWorkflow is the sample cron workflow.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL