trusted-cgi icon indicating copy to clipboard operation
trusted-cgi copied to clipboard

How to run lambdas periodically?

Open biozz opened this issue 4 years ago • 1 comments

Hi!

I would like to run some of my lambdas periodically and it seems there is no straightforward way to do that. What I did was I created a ping action, which curls lambda url and thus invokes it.

ping:
	curl https://my.function.url/

This is a hacky solution, but what is the intended way?

Is it possible to add launcher as an action into the scheduler?

Screenshot 2021-01-10 at 01 25 44

ping action on the screenshot is what I use right now and run is what I would like to have

biozz avatar Jan 09 '21 22:01 biozz

My apologies for the delay reply.

Create a target in Makefile that will run your script. For example, for python:

run:
	echo '{}' | ./venv/bin/python3 app.py

In echo you may use any payload. Than use run as an action in scheduler. Exact command you may find in a Launcher tab.

It will be nice to have some 'sugar' for the convenience, but right now it's not in a backlog, however, PR will be appreciated.

reddec avatar Jan 25 '21 13:01 reddec