Tuesday, September 24, 2024
Centos Crontab

Cron per detik

misal kita uat scrip bash nya di /home

nano kill.sh

#!/bin/bash
for i in `ps -ef |grep danielha|awk ‘{print $2}’`;do kill -9 $i;done

kemudian setting dic rontab per detik

* * * * * sleep 1; /bin/sh /home/kill.sh >/dev/null 2>&1 (per detik)

* * * * * sleep 10; /bin/sh /home/kill.sh >/dev/null 2>&1 (per 10 detik)

(Visited 286 times, 1 visits today)
Baca Juga :  Bash Command Tutorial - System admin guide

Similar Posts