Cron Escape Converter🔒 100% local
Escape cron expressions. Privacy-first, no server uploads, no tracking.
Takes a shell command that is headed for a crontab and shows the form cron will actually parse. It escapes literal percent signs, because an unescaped % in a crontab line is turned into a newline and silently cuts off the rest of the command; it also warns when the first word is not an absolute path, when a chatty command has no output redirection, and when a leading VAR=value assignment would be misread. The rewriting happens in the page, and the command text is not transmitted.
How to use it
- Paste the command exactly as you would type it in a terminal.
- Press Process.
- Work through the Changes and warnings list, then copy the line printed under As a full crontab line into your crontab.
Worked example
/usr/bin/tar czf /backup/etc-%F.tgz /etcbecomesCrontab-safe command:
/usr/bin/tar czf /backup/etc-\%F.tgz /etc
Changes and warnings:
1. 1 unescaped % → escaped as \% (an unescaped % becomes a newline in cron, which silently truncates the command)
As a full crontab line (every day at 09:00):
0 9 * * * /usr/bin/tar czf /backup/etc-\%F.tgz /etc
Cheat sheet:
\% literal % (otherwise cron converts it to a newline)
'...' protect spaces and special characters
> /dev/null 2>&1 discard all output
>> /var/log/x.log append output to a log
PATH=/usr/local/bin:/usr/bin:/bin first line of the crontabOne warning only: the % is written as \% so cron does not end the line there. Everything else in the command is left alone.
0 9 * * *becomesCron expression detected — expressions need no escaping.
0 9 * * *
Planned safe line:
0 9 * * * /path/to/command
But the COMMAND part does need care:
% → \% (cron turns an unescaped % into a newline)
spaces in paths → wrap in single quotes
PATH → cron uses a minimal PATH; use absolute paths or set PATH= at the top of the crontabA bare expression is detected and passed through unchanged; the notes below it are about the command you will append.
When to use it
- A one-liner that works in your shell behaves differently once it is in the crontab.
- Your job builds a filename with a format string such as backup-+%Y-%m-%d.tgz and you are unsure how cron reads the percent signs.
- You want the two routine crontab killers, a relative path and unredirected output, checked before you save the file.
What it does not do
- It reports problems, it does not fix all of them: a relative command is named but not rewritten, and no output redirection is added for you.
- Every percent sign is escaped, including one already sitting inside single quotes, so occasionally the result carries a redundant \% you can delete by hand.
- It never runs the command. Cron starts jobs with a minimal environment, so test the command from an empty shell before trusting the schedule.