You are not logged in.
My crontab appears to be being saved in /tmp, which means it gets deleted on shutdown / reboot.
How to relocate crontab?
(I usually access via
crontab -e)
Last edited by Joe90 (2013-12-13 00:31:18)
Offline
I think the crontab gets exported to a textfile in /tmp, then the editor is called, then the file is sucked back into the crontab.
I don't know what's causing it, but in the meantime you can stop losing work by saving your crontab entry to a file in your homedir or something and using that to repopulate the tab.
crontab -l > cron.bakIs this an existing install or a new install? Was cron every keeping the entries correctly? Does cron perform the entries until reboot?
brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)
Offline
It has been doing it since new install in October, so has always been created in /tmp. I have backed up the entries I made, so any work not lost, just means that none of the jobs run after reboot because they have been cleared.
Where is the file supposed to be (and how would I create it there) and why is it not being created there instead of in /tmp ?
A google search tells me it should be located in
/var/spool/cron/crontabs/#USER
or in my case ;)
/var/spool/cron/crontabs/Joe90But there is nothing there....
EDIT
Just made a #comment edit using "crontab -e" and a file name Joe90 appeared in the crontabs folder. Will have to see if it persists?
Last edited by Joe90 (2013-12-12 22:36:21)
Offline
The temporarily edited file being created in /tmp is normal; it's just a transient file for the user to work on. (sorry if you already know this stuff -- adding extra for onlookers.)
The part where the resulting crontab disappears after reboot is weird. Is everything under /var/spool cleared out after reboot? Maybe some cleanup process getting overzealous.
Watching with interest. Hopefully someone will chime in with more ideas.
brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)
Offline
Thanks for the info on the transient file, had kind of figured out that was happening but good to have confirmation this is normal as helps to track problem 
OK on reboot file #USER/Joe90 is removed/gone/deleted from /var/spool/cron/crontabs.
There is a cups folder too under /var/spool but that is empty, other folders under var look OK, e.g. log and cache.
So, I know it is created correctly and in the correct place when i edit with crontab -e, but not why or by what it is being deleted?
Offline
Solved it! All my fault. Blame short term memory loss!
Because I am running an SSD I have this in my fstab:
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0Hence why it is going awol on reboot
I'll go to the back of the class and wear the pointy hat for the rest of the lesson 
Offline
Ha. I did a startpage search and was just about to ask if you had /var/spool on a tmpfs. Glad you got it solved.
http://www.ambience.sk/cron-gets-delete … -in-linux/
Last edited by porkpiehat (2013-12-13 01:35:35)
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: zapp