UNPKG

@porosys/pss

Version:

Porosys Server Setup (pss): General-purpose server setup and automation tool (including Netdata management)

11 lines (10 loc) 273 B
import { execa } from 'execa'; export const isCronJobPresent = async (scriptPath) => { try { const { stdout } = await execa('crontab -l 2>/dev/null', { shell: true }); return stdout.includes(scriptPath); } catch { return false; } };