> For the complete documentation index, see [llms.txt](https://guru-1.gitbook.io/bq-aquaris-e-4-5-ubuntu-phone/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guru-1.gitbook.io/bq-aquaris-e-4-5-ubuntu-phone/en/chapter20.md).

# Cron jobs

To run crontab jobs one must remount the rootfs writeable:

```
$ sudo mount -o remount,rw /
$ crontab -e
$ sudo mount -o remount,ro /
```

With this I installed a cron job for user 'phablet' which saves every five minutes the current list of all processes to catch this run away / battery drain problem

```
$ sudo crontab -e -u phablet
00,05,10,15,20,25,30,35,40,45,50,55 * * * *   /home/phablet/mon1.sh
```

```
$ cat mon1.sh 
#!/bin/sh

printf "\n\n"                                                      >> /home/phablet/mon.out
date                                                               >> /home/phablet/mon.out
printf "battery capacity%%: "                                      >> /home/phablet/mon.out
cat /sys/devices/platform/battery/power_supply/battery/capacity    >> /home/phablet/mon.out
printf "battery temp     : "                                       >> /home/phablet/mon.out
cat /sys/devices/platform/battery/power_supply/battery/temp        >> /home/phablet/mon.out
top -b -n1 -o %CPU | head -n 20                                    >> /home/phablet/mon.out
```

Last updated: Sun Nov 1 10:12:25 CET 2015
