UNPKG

@porosys/pss

Version:

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

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