OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: bam on July 25, 2005, 04:22:50 pm

Title: Installing Cron
Post by: bam on July 25, 2005, 04:22:50 pm
getting msg no crontab for root when executing command crontab -l, any ideas, following the readme in vixie cron.
Title: Installing Cron
Post by: eekee on July 25, 2005, 05:51:33 pm
That's simple enough, if I'm not mistaken: crontab -l lists your current crontab, but unless there's a bug there you don't have one yet.
Title: Installing Cron
Post by: bam on July 26, 2005, 12:46:56 am
ok how do I say check a process(swapfile) then if it isnt running start the swapfile? Thats actually what im gonna use it for, also gonna check some other things as well, if the sd card isnt installed then start a swapfile on my hdd, if sd card is there then start the swapfile on sd card, in conjuction with stopping the swapfile on card eject. You got the point.
Title: Installing Cron
Post by: eekee on August 07, 2005, 08:32:32 pm
For the actual test, if you've got a 'big' Linux system handy (or are lucky enough to have man pages on your Z) I'd check the man pages for swapon & swapoff. There might be something like swapon -l to list swap areas, if not... I'd hack something using the output of the free command to check whether swap is active or not, although that doesn't seem like a wonderful solution.

I expect there's some way to hook into the hotplug (or whatever) system to swapon when your card's inserted, or you can look at the crontab man page to find out how to do it that way. The cron way may be a little more reliable, but you'll have to write a script to perform that check & if you don't already know how to do that it'll take some effort to learn. I can give you a pointer or two if you like, should save you some time.

For ejecting, if you're lucky the actual eject command the GUI uses will be configurable and you can insert your own script to swapoff before unmounting / ejecting. If not, you'll have to run your swapoff+eject script from a terminal instead of using the GUIs eject button.

One thing, swap on your SD card will wear out the card, they (& other flash memory devces) are only good for so many write operations but you knew that right?