🌐 Hosting
🌐
Hosting Checker
💰
Price Comparator
📦
Migration Checklist
💵
Cost Calculator

🔍 DNS & Network
🔍
DNS Lookup
🌍
DNS Propagation
📡
IP Lookup / WHOIS
🔌
Port Checker

🔒 Security
🔒
SSL Checker
🛡️
HTTP Header Checker
🔑
Password Generator
🤖
Robots.txt Generator

⚡ Performance
Speed Tester
⏱️
TTFB Tester
📡
Ping Tool
📊
Uptime Checker
📸
Screenshot Tool

</> Developer
{ }
JSON Formatter
64
Base64 Encoder
/./
Regex Tester
Cron Generator
📝
.htaccess Generator

☁️ Server & Cloud
🐘
PHP & MySQL Checker
☁️
AWS Cost Calculator

Cron Job
Expression
Generator

Build crontab expressions visually. No memorising syntax — just pick your schedule and get the expression instantly.

Cron Expression
*minute
*hour
*day(month)
*month
*day(week)
Every minute
/ Quick Presets
Every minute
Every 5 min
Every 15 min
Every hour
Daily at midnight
Daily at 9am
Weekly (Sunday)
Monthly
Yearly
Business hours
Nightly backup (2am)
Every 30 min
/ Next 5 Scheduled Runs
Calculating...

Cron Job Generator

A cron job is a time-based task scheduler in Unix/Linux systems. The crontab syntax uses 5 fields separated by spaces: minute, hour, day-of-month, month, and day-of-week. Each field can be a specific value, a wildcard (*), a range (1-5), a list (1,3,5), or a step value (*/2).

Cron expression syntax

How to add a cron job on Linux

Run crontab -e in your terminal to open the crontab editor. Add your cron expression followed by the command to run, for example: 0 2 * * * /usr/bin/php /var/www/backup.php

Frequently Asked Questions

What timezone do cron jobs run in? +
By default, cron uses the server's local timezone set in /etc/timezone. If you need a specific timezone, you can set it at the top of your crontab with CRON_TZ=America/New_York, or use a tool like systemd timers which support timezone specification.
Why isn't my cron job running? +
Common causes: (1) Incorrect syntax — use this generator to verify, (2) Command uses relative paths — always use absolute paths in cron, (3) Missing environment variables — cron has a minimal environment; specify PATH explicitly, (4) Permission issues — ensure the script is executable.
What's the minimum cron interval? +
The minimum interval for standard cron is 1 minute. If you need sub-minute scheduling, use alternative tools like systemd timers, or run a cron job every minute that triggers an internal loop.
How do I run a cron job in cPanel? +
Log in to cPanel, go to Advanced > Cron Jobs. Set the schedule fields (which match this generator's output) and enter your command. cPanel cron jobs support the full crontab syntax and run as your hosting account user.
const FIELDS=[ {id:'min',label:'Minute',min:0,max:59,names:null}, {id:'hr',label:'Hour',min:0,max:23,names:null}, {id:'dom',label:'Day of Month',min:1,max:31,names:null}, {id:'mon',label:'Month',min:1,max:12,names:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']}, {id:'dow',label:'Day of Week',min:0,max:6,names:['Sun','Mon','Tue','Wed','Thu','Fri','Sat']}, ]; const state={min:'*',hr:'*',dom:'*',mon:'*',dow:'*'}; const typeState={min:'any',hr:'any',dom:'any',mon:'any',dow:'any'}; function buildUI(){ const b=document.getElementById('builder'); b.innerHTML=FIELDS.map(f=>{ const vals=[]; for(let i=f.min;i<=f.max;i++)vals.push(i); return`
${f.label} *
`; }).join(''); } function setType(fid,type){ typeState[fid]=type; document.querySelectorAll(`[data-field="${fid}"].type-btn`).forEach(b=>b.classList.toggle('active',b.dataset.type===type)); renderValUI(fid); } function renderValUI(fid){ const f=FIELDS.find(x=>x.id===fid); const container=document.getElementById('vals_'+fid); const type=typeState[fid]; if(type==='any'){state[fid]='*';container.innerHTML='';update();return;} if(type==='specific'){ const vals=[];for(let i=f.min;i<=f.max;i++)vals.push(i); const current=(state[fid]==='*'||typeState[fid]!=='specific')?[]:(state[fid].split(',').map(Number)); container.innerHTML=`
${vals.map(v=>{ const name=f.names?f.names[v-f.min]:''; const active=current.includes(v)?'active':''; return`
${name||v}
`; }).join('')}
`; if(current.length===0){state[fid]='*';} return; } if(type==='range'){ container.innerHTML=`
From to
`; updateRange(fid);return; } if(type==='step'){ container.innerHTML=`
Every ${f.label.toLowerCase()}(s)
`; updateStep(fid);return; } } function toggleVal(fid,v,el){ el.classList.toggle('active'); const active=[...document.querySelectorAll(`#vals_${fid} .val-chip.active`)].map(e=>parseInt(e.textContent.match(/\d+/)?.[0])||parseInt(e.textContent)); const f=FIELDS.find(x=>x.id===fid); if(f.names){ const realVals=[...document.querySelectorAll(`#vals_${fid} .val-chip.active`)].map(e=>{ const idx=[...e.parentElement.children].indexOf(e); return f.min+idx; }); state[fid]=realVals.length?realVals.join(','):'*'; } else { state[fid]=active.length?active.sort((a,b)=>a-b).join(','):'*'; } update(); } function updateRange(fid){ const from=document.getElementById('r_from_'+fid)?.value||0; const to=document.getElementById('r_to_'+fid)?.value||0; state[fid]=from+'-'+to;update(); } function updateStep(fid){ const step=document.getElementById('step_'+fid)?.value||1; state[fid]='*/'+step;update(); } function update(){ const expr=`${state.min} ${state.hr} ${state.dom} ${state.mon} ${state.dow}`; document.getElementById('ep_min').textContent=state.min; document.getElementById('ep_hr').textContent=state.hr; document.getElementById('ep_dom').textContent=state.dom; document.getElementById('ep_mon').textContent=state.mon; document.getElementById('ep_dow').textContent=state.dow; FIELDS.forEach(f=>document.getElementById('fc_'+f.id).textContent=state[f.id]); document.getElementById('exprHuman').textContent=humanize(expr); calcNextRuns(expr); } function humanize(expr){ const[min,hr,dom,mon,dow]=expr.split(' '); if(expr==='* * * * *')return'Every minute'; if(min.startsWith('*/'))return`Every ${min.slice(2)} minutes`; if(min==='0'&&hr==='*')return'Every hour (on the hour)'; if(min==='0'&&hr!='*'&&dom==='*'&&mon==='*'&&dow==='*'){ const h=parseInt(hr);const ampm=h>=12?'PM':'AM';const h12=h%12||12; return`Every day at ${h12}:00 ${ampm}`; } if(min==='0'&&hr==='0'&&dom==='*'&&mon==='*'&&dow==='*')return'Every day at midnight'; if(min==='0'&&hr==='0'&&dom==='1'&&mon==='*'&&dow==='*')return'First day of every month at midnight'; if(min==='0'&&hr==='0'&&dom==='*'&&mon==='*'&&dow==='0')return'Every Sunday at midnight'; if(hr.includes('-')&&dow.includes('-')){return`Business hours: ${hr} each day (${dow})`;} return`Scheduled: ${expr}`; } function calcNextRuns(expr){ const list=document.getElementById('nrList'); try{ const runs=getNextRuns(expr,5); const now=Date.now(); list.innerHTML=runs.map((d,i)=>{ const diff=d-now; const rel=diff<60000?'in <1 min':diff<3600000?`in ${Math.round(diff/60000)} min`:diff<86400000?`in ${Math.round(diff/3600000)}h`:diff<604800000?`in ${Math.round(diff/86400000)}d`:`in ${Math.round(diff/604800000)}wk`; return`
${i+1}.${d.toLocaleString('en-GB',{weekday:'short',day:'2-digit',month:'short',hour:'2-digit',minute:'2-digit'})}${rel}
`; }).join(''); }catch(e){list.innerHTML='
Could not calculate next runs
';} } function getNextRuns(expr,n){ const[minE,hrE,domE,monE,dowE]=expr.split(' '); const matches=[]; let d=new Date();d.setSeconds(0,0);d.setMinutes(d.getMinutes()+1); let limit=0; while(matches.length=a&&val<=b;} if(expr.includes(',')){return expr.split(',').map(Number).includes(val);} return parseInt(expr)===val; } function applyPreset(expr,human){ const[min,hr,dom,mon,dow]=expr.split(' '); Object.assign(state,{min,hr,dom,mon,dow}); document.querySelectorAll('.preset-tag').forEach(t=>t.classList.remove('active')); event.target.classList.add('active'); / Reset type selectors FIELDS.forEach(f=>{ typeState[f.id]='any'; document.querySelectorAll(`[data-field="${f.id}"].type-btn`).forEach(b=>b.classList.toggle('active',b.dataset.type==='any')); document.getElementById('vals_'+f.id).innerHTML=''; }); update(); } function copyExpr(){ const expr=`${state.min} ${state.hr} ${state.dom} ${state.mon} ${state.dow}`; navigator.clipboard.writeText(expr); const btn=event.target;btn.textContent='✅ Copied!';setTimeout(()=>btn.textContent='📋 Copy',2000); } function copyWithCmd(){ const expr=`${state.min} ${state.hr} ${state.dom} ${state.mon} ${state.dow}`; navigator.clipboard.writeText(expr+' /path/to/command'); const btn=event.target;btn.textContent='✅ Copied!';setTimeout(()=>btn.textContent='Copy with command',2000); } buildUI(); update();