JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://wzrd.in/standalone/cron@latest"></script>
<body>
Running cron...
</body>
CSS
body {
/*margin: 40px auto;*/
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
h2,
h3 {
line-height: 1.2
}
Babel + JSX
const job = new cron.CronJob('*/2 * * * * *',
() => document.body.innerHTML = Date(),
null, true, 'America/New_York');
job.run();
const midnightJob = new cron.CronJob('* * * * * 1',
() => {
job.stop();
document.body.innerHTML = `It's Monday`;
});
midnightJob.run();