NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
PatrikL
Oct 12, 2011Aspirant
Not getting cron to work
I've tried to get a script (importing torrent files from rss) executed once an hour by simply placing it in cron.hourly but nothing whatsoever happens. The script executes well manually when I'm logge...
tiranor
Jul 03, 2013Aspirant
Hi there, I'm digging back the thread.
I've install foscam cams at home and in my garage, and the foscam software doesn't include video recording...
I've looked about everywhere to have something working on my NAS (without paying the hundreds dollars for ReadyNAS surveillance, which seems to suck...), and i've found a thread where someone managed to get a cron job associated to the curl command to record the video stream of the cams, in 5 minutes timestamped videofiles.
After few tweaks, i managed to make it work perfectly with my NAS, except one component : the cron job. It doesn't manage to run anything...
I've tested the script, everything works, but i feel like i've tested any cron configuration possible, but it never works (neither the cron job to launch skifta at startup).
Is there a special thing to do to have cron working with my ultra, or am i just that bad with linux ?
Edit :
Just forgot :
My script which works "perfectly" (even launched via /bin/sh) : recordfoscam.sh (located in /opt/)
Note : The variable with the folder name is created bacause when running with /bin/sh, it seemed like the end of the command was scratched
I've then added, with crontab -e, and a file in cron.d :
I've install foscam cams at home and in my garage, and the foscam software doesn't include video recording...
I've looked about everywhere to have something working on my NAS (without paying the hundreds dollars for ReadyNAS surveillance, which seems to suck...), and i've found a thread where someone managed to get a cron job associated to the curl command to record the video stream of the cams, in 5 minutes timestamped videofiles.
After few tweaks, i managed to make it work perfectly with my NAS, except one component : the cron job. It doesn't manage to run anything...
I've tested the script, everything works, but i feel like i've tested any cron configuration possible, but it never works (neither the cron job to launch skifta at startup).
Is there a special thing to do to have cron working with my ultra, or am i just that bad with linux ?
Edit :
Just forgot :
My script which works "perfectly" (even launched via /bin/sh) : recordfoscam.sh (located in /opt/)
DOSS1="/c/Foscam/appart/"
NEW_NAME="appart"$(date +%d)"."$(date +%m)"."$(date +%y)"-hour"$(date +%H)"-"$(date +%M)".avi"
nohup curl -s -m 295 -o $DOSS1$NEW_NAME http://user:pass@192.168.0.71:XXXX/videostream.asf & sleep 1
DOSS2="/c/Foscam/garage/"
NEW_SAME="garage"$(date +%d)"."$(date +%m)"."$(date +%y)"-hour"$(date +%H)"-"$(date +%M)".avi"
nohup curl -s -m 295 -o $DOSS2$NEW_SAME http://user:pass@192.168.0.72:XXXX/videostream.asf & sleep 1
Note : The variable with the folder name is created bacause when running with /bin/sh, it seemed like the end of the command was scratched
I've then added, with crontab -e, and a file in cron.d :
# record of webcams
*/5 * * * * root /opt/recordfoscam.sh
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!