https://github.com/dschep/serverless-at
A serverless implementation of the UNIX at command
https://github.com/dschep/serverless-at
Last synced: 5 months ago
JSON representation
A serverless implementation of the UNIX at command
- Host: GitHub
- URL: https://github.com/dschep/serverless-at
- Owner: dschep
- License: apache-2.0
- Created: 2019-08-16T15:05:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-20T12:54:13.000Z (over 6 years ago)
- Last Synced: 2025-01-17T16:55:55.829Z (about 1 year ago)
- Language: JavaScript
- Size: 44.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# :zap::alarm_clock: Serverless `at`
Instantly schedule one-time jobs to run on AWS Lambda using
[Serverless Components](https://github.com/serverless/components). Inspired by the UNIX `at`
command.
1. [Install](#1-install)
2. [Create a script](#2-create-a-script)
3. [Deploy](#3-deploy)
### 1. Install
```console
$ npm install -g dschep/serverless-at
```
### 2. Create a script
Create a file (Python & NodeJS currently supported) containing
a lambda handler called `task`.
Eg: `foo.py` containing:
```python
def task(event, context):
print('huzzah')
return
```
or: `foo.js` containing:
```javascript
module.exports.task = async () => {
console.log('huzzah')
return
}
```
### 3. Deploy
```console
$ sls-at foo.py 2019-08-16T12:00:00
```
The 1st argument is your script containing a `task` lambda handler function,
the 2nd is an [EcmaScript date](http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15).