This happened yesterday.
I was logged into one of my servers via mobile phone.
I do this often, ConnectBot helps a lot, pulling some changes from some of my repositories, added there a new file, that I needed to put into cron.
Quick, let's do that change..click
crontab -r
Et voilá
The result you can see above.
Wait what, what did I do?
ARGHL..e
and r
are way to close on this android keyboard!
What does crontab -r
do?
Let's see the manual:
-r
The current crontab will be removed.
Mind you, I was on mobile. I lost all cron entries for my user, around 50.
And did you ever backup /var/spool/crontabs/
?
Me neither. Why?;)
Lucky me, all my scripts start with:
print(time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.localtime()),flush=True)
and I keep logfiles from all my script outputs.
Surprisingly, after half an hour I was done with everything.
Crontab is filled and running.
But I still have the feeling, I forgot some scripts..
Well, in a week or so, I should know;)
So, if you see any weird behyviour from my user, cron is still wrong:))