Hmm…interesting - and just as I thought…one of cron’s own processes is rewritng the crontab file - a really stupid thing to do.
Now that you mention it, I do have firmware auto update turned OFF (otherwise my custom firmware would be overwritten). And I thought all this time that one of the other cron jobs, the auto_fw is responsble for checking the firmware. I just found out it does so - but also has other purposes:
~ # auto_fw -h
***For FW Auto Upgrade***
“auto_fw -c 0/1(send_alert)” : Check Firmware Version from WD Server, ex: “auto_fw -c 1”
“auto_fw -d 0/1(reboot)” : Download and Install Firmware, ex: “auto_fw -d 0”
“auto_fw -f 0/1(reboot)” : Download and Install Firmware for REST API, ex: “auto_fw -f 1”
" auto_fw -s version" : Simulating fw version, ex: “auto_fw -s 1.01.01”
***For APPs Auto Upgrade***
" auto_fw -a -c" : Check WD Server and Get APPs Xml File
" auto_fw -a -g app_name" : Get Release Note File from WD Server, ex: “auto_fw -a -g WordPress”
" auto_fw -a -d app_name" : Download and Install APP, ex: “auto_fw -a -d WordPress”
" auto_fw -a -t xml_path" : For Test APPs function, ex: “auto_fw -a -t /mnt/HD/HD_a2/Public/WDMyCloudEX4.xml”
***For Others***
" auto_fw -h" : Help
" auto_fw -r" : Remove All Files
This brings me to the very same question that you came to - what could really be the purpose of random_check since you already have ‘auto_fw -c 1’ job run at 11:48 PM every night (which checks for the latest the firmware version)? I tried to run ’ random_check -h’ but I don’t have that program in my firmware version. So we won’t know it’s REAL purpose for sure since it’s a compiled binary…but the help message you diligently found gives us some idea of what it’s purported to do…I just am not sure how much to trust if it really does what it says it does Because there was already such a feature built-in before…so why the need for this job? Seems very fishy to me.
I do recommend the following:
-
If you are willing to download and install new firmware releases manually, then in Settings → Firmware Update → Auto Update → Enable Auto Update → set it to OFF. Until the firmware is upgraded to the latest, it will indicate that your firmware is out-of-date in an orange alert icon on the dashboard’s login page. Which is actually a good idea anyway…I DO like to know what the changes are in a new firmware version before I blindly install it. And it is a easy as clicking that right arrow on the firmware update section in the web dashboard to initiate the upgrade. Just gives you more manual control.
-
Remove the random_check job from your cron (I don’t recommend using the random_check -c option but rather editing out the job out of the crontab file).
After this, I believe your cron issues will go away. It will still be a headache for every reboot - but now that you’ve also turned auto-upgrade off, it shouldn’t reboot by itself ever…you’ll always know when it reboots and you’ll just have to remember that you have to do the cron steps yourself manually again after the reboot - both removing this line and adding the script for your timestamp check that you wanted to do originally.
BTW, I just checked - my cron is running fine and that job is still spitting out the timestamp 8 hours in a row:
~ # cat /var/log/temp.txt
Tue Aug 12 16:16 :01 EDT 2014
Tue Aug 12 17:16 :01 EDT 2014
Tue Aug 12 18:16 :01 EDT 2014
Tue Aug 12 19:16 :01 EDT 2014
Tue Aug 12 20:16 :01 EDT 2014
Tue Aug 12 21:16 :01 EDT 2014
Tue Aug 12 22:16 :01 EDT 2014
Tue Aug 12 23:16 :01 EDT 2014
Wed Aug 13 00:16 :01 EDT 2014
If this answer helps resolve your issue for good, only after testing your cron after making those changes, please mark this post as the solution and give me a kudo on this post if you don’t mind (appreciate the other kudo).