roleoroleo / yi-hack-MStar

Custom firmware for Yi 1080p camera based on MStar platform
GNU General Public License v3.0
835 stars 110 forks source link

cron reboot once a day #443

Closed gmourasilva closed 2 years ago

gmourasilva commented 2 years ago

Hi

I have a camera that is saving files on an SFTP server. It looks like sometimes files are not copied, which doesn't have to my other camera (another brand). Not sure if it is something with my network or the firmware, but I know that it is fixed by rebooting the camera in the admin panel.

Decided to create a cron job in the web panel to reboot once a day but it doesn't work.

0 0 * * * sudo reboot

What is the right command to reboot? Tried reboot and sudo reboot but it didn't work.

Thanks

roleoroleo commented 2 years ago

Use reboot -f but add some sync.

gmourasilva commented 2 years ago

Sorry, what do you mean by "but add some sync"? Tried 45 * * * * reboot -f and it didn't work

roleoroleo commented 2 years ago

45 * * * * sync; sync; sync; reboot -f

gmourasilva commented 2 years ago

That worked like a charm, thank you