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;
  }
}; 