Any specific reason why you don't want to use regular crontab?
% echo "* * * * * /Users/paul/Desktop/1.sh" | crontab -
This command should add a cron job that runs once a minute.
Indicate that this command will also replace any existing crontab. crontab - command crontab - should be used with care as a short string.
If you want to edit an existing crontab to avoid erasing previously defined jobs, you can use crontab -e . (If it starts vim , and you don't know how to use vim , you can exit by pressing ESC : q ! Enter , and then go to the documentation for the search.)
If you need instructions on editing crontabs, enter man crontab in your shell. If you need syntax information in a crontab file, man 5 crontab will show you this.
Enjoy it!
UPDATE: (for each comment)
A simple hack is required every 30 seconds to complete your work. Cron only runs jobs in a minute, so you can have two jobs to run every 30 seconds, one of which has a delay of 30 seconds. For example:
#Mn Hr Da Mo DW Command * * * * * /Users/paul/Desktop/1.sh * * * * * sleep 30; /Users/paul/Desktop/1.sh
Hope this helps.
ghoti
source share