Thursday, 15 April 2010

linux - Set cronjob with php (Raspberry Pi) -



linux - Set cronjob with php (Raspberry Pi) -

i want set cronjob on raspberry pi

this want insert

30 16 * * * sudo /home/pi/raspberry-remote/./send 11010 1 1

i have tried not work

exec("crontab -e 30 16 * * * sudo /home/pi/raspberry-remote/./send 11010 1 1");

the -e alternative means editor opens. not want.

you need

exec('echo "30 16 * * * sudo /home/pi/raspberry-remote/./send 11010 1 1" | crontab -');

php linux cron raspberry-pi

No comments:

Post a Comment