Public
Cron
Readme

Trying out val town functionality, code from https://docs.val.town/quickstarts/first-cron/

1
2
3
4
5
6
7
8
9
10
11
import { email } from "https://esm.town/v/std/email";
import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
export default async function(interval: Interval) {
let weather = await getWeather("Chicago, IL");
let howItFeelin = weather.current_condition[0].FeelsLikeF;
let chanceOfMeatball = weather.current_condition[0].weatherDesc[0].value;
await email({
subject: `Weather is something like ${chanceOfMeatball} and ${howItFeelin}° I guess シ`,
});
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
May 31, 2024