Hi everyone,
I’m building a workflow that checks scheduled events every minute. Each event has a human-readable description of when it should run — for example:
“every 5 minutes”, “every Monday at 9am”, or “on the 1st and 15th of each month at 2:30pm”.
I’d like to evaluate these descriptions in n8n and trigger actions only when the current time matches the description. Here’s what I’ve tried so far:
AI-based parsing (with the AI Agent node) to convert the description to a boolean match at runtime — works, but it’s too uncertain and costly over time.
Custom JS parser in a Code node that interprets standard 5-field cron expressions (supports */5, 1-5, 1,15, etc.) — stable and working, but only for actual cron strings, not free-text.
I would love to know:
Has anyone built or used a lightweight parser for human-readable scheduling in n8n?
Is there a way to preprocess natural language once (e.g., convert “every Monday at 9” to 0 9 * * 1) and store it as a cron string?
Or maybe someone has wrapped a library like later.js or cron-parser in a service or custom node?
Any insights, tools, or workflows you’re using would be super helpful. 
Thanks in advance!
Just tried using a 4.1-mini for this and it appears to produce good results, not sure why this would be uncertain, but I guess you could try to confuse the model with overly complicated wording…
As for the community node, do you think later.js wrapper would be useful?
Ai has a cost and could be slow
Later.js Is free and Quick
It could help a lot
More
I Need a parser too. Not only a convergere tò cron tablet
How can i verify if a cron valute match with current datetime?
what do you mean by that? cron to next occurrence?
I guess it depends, if we are talking about AI Agent, we can provide current datetime to the agent, and it can compare the cron value to the next occurrence
the same can be done in the Later.js library I think.
Try to simplify
I have a table with differenti events
Each event has its own schedule (cron or human Cron)
How to run them in the required schedule time?
I think to run a schedule and then parse every schedule in table wirh current time, but I Need to parse the schedule field and I dont know how to do it
Ok, instead of building a wrapper, I tried different approach, I’ve built a docker image with later and exposed it with express. If interested, here is what I did:
- Create a folder where your image files are going to be
mkdir nodejs-docker
cd nodejs-docker/
- Initialize the project and install deps:
npm init -y
npm install express later
- Create the server for your requests
vim index.js
const express = require('express');
const later = require('@breejs/later');
const app = express();
const PORT = process.env.PORT || 5000;
app.get('/parse', (req, res) => {
const { text, cron } = req.query;
if (text === undefined && cron === undefined) {
return res.status(400).json({ error: 'Either text or cron parameter is required' });
}
let schedule;
if (text) {
schedule = later.parse.text(text);
} else {
schedule = later.parse.cron(cron);
}
res.json({
'next_10': later.schedule(schedule).next(10),
'prev_10': later.schedule(schedule).prev(10)
});
});
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
- Create a docker file for building an image:
vim Dockerfile
FROM node:20
# Set working directory
WORKDIR /app
# Copy files
COPY package*.json ./
RUN npm install
COPY . .
# Expose the port
EXPOSE 5000
# Start the app
CMD ["node", "index.js"]
- Build the image
docker build -t later-api .
- Add a new container to the docker-compose.yml with your n8n
vim ~/n8n/docker-compose.yml
services:
later-api:
image: later-api:latest
hostname: later
container_name: later
networks: ['n8n']
- Restart your infrastructure
docker compose --profile cpu down
docker compose --profile cpu up -d
- Create an HTTP Request node and try your new server
-
Play with query parameters text
and cron
to parse either natural language or cron expression.
-
I just wanted this to be 10 steps, so this step is just for fun.
Oh, and just to explain a bit further re what I chose this over creating a wrapper in a form of a custom node.
It appears using third party libraries in custom nodes and functions has a limitation that you still need to install the modules in the container manually or semi-manually, which feels like an odd thing to do.
The alternative was to host ‘later’ locally or remotely. Locally seems like a sound choice, so here we are.
Parsing cron expression:
Thanks! Very clever solution