How to use crontab in Android?

Requrements\r\n\r\n1.Root access\r\n\r\n2.Busybox : for ‘crond’ service\r\n\r\n3.init.d : to start ‘crond’ service at boot\r\n\r\nCreating cronjob\r\n\r\nCreate the cronjob file in directory /data/crontab/ with filename root. Write your cronjob inside the file ‘root’. Set executable permissions for the file ‘root’\r\n\r\nTest without rebooting\r\n\r\nNow open any terminal emulator in device and run the following commands..\r\n

su -\r\n\r\ncrond -b -c /data/cronjob

\r\nNow the crond service will start, to check type…\r\n

top | grep crond

\r\nStart crond at booto\r\n\r\ncreate a file at /system/etc/init.d with executable permission and enter the following lines\r\n

crond -b -c /data/crond

\r\nExample cronjobs\r\n\r\n53 * * * * reboot\r\n\r\nWill reboot your device on 53rd minute of every hour.

时间:2015/06/13
/
浏览:3918 Views views
/
分类:乐此不倦
/

你目前的身份是游客,评论请输入昵称和电邮!
输入评论内容...