Reply to da script a php

Your name:

Reply:


Posted by Alen192 on 09/06/07 16:03

i have create this simple script i bash that modify the crontab's
user's file with an option passed by standard input, now i would know
if is possible create a similar script with php so i can choose with
radiobutton or check box, the frequency of the command in crontabs
lines.
In case of option=1 the cmd is executed every 10 minutes
in case of option=2 every 20 minutes
an so far

this is an extract of script
-----------------------------------------------
empty_crontab () {
clear
echo "----------------------------------------------"
/etc/init.d/cron stop
cat /dev/null > /var/spool/cron/crontabs/alessandro
}

cron_restart () {
sleep 2
/etc/init.d/cron restart
/opt/cartel_userinit
}
case $option in

#option prende da 1 a n se è 1 */10 minuti, se è 2 */20 e cosi via
"1.....n")
svuoto_crontab
echo "*/10 * * * * sudo pon cartellinator" > /var/spool/cron/
crontabs/alessandro
echo "Connessione al server di posta ogni 10 minuti"
cron_restart
;;

esac
---------------------------------
PS: is exists a command to write a file without echo line1 >>file,
echo line2>>file etc.?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация