Click here to go to the forum index Click here for the home page
 
Author Message

<  Computer connections  ~  Timer for Slug

Page 1 of 1
machare
Posted: Sun Nov 09, 2014 12:34 am Reply with quote
Frequent contributor Joined: 14 Jun 2005 Posts: 111
I have an NSLU2 which I have configured for use with my toppy. (unslung)

I would like to run a script about once an hour. Is there a way that I can set a timer to do this. (There is no crontab.)

_________________
Michael Chare

TF5800, IA On, TS On, F/W: 5.13.65T 14/4/2009 +CwOtTd
TAPs: Power Manager v1.2; Jag's EPG v3.0 Beta 5 (Freeware Edition); PcControl X25a; MyInfo B5.6;
View user's profile Send private message
billmars
Posted: Sun Nov 09, 2014 11:17 am Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 750 Location: Hull
Do you mean there is no crontab file in /etc?
If not, create one.
This is mine:-
Code:
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO="bill@bill*******"
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
#0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null#
#run this once a day (at midnight)#
0 0 * * * root /usr/sbin/CheckDiskFull &>/dev/null
0 0 * * * root /usr/sbin/WatchDog &>/dev/null

#original#
#1,21,41 * * * * root /opt/bin/ntpclient -s -l -h uk.pool.ntp.org >>/var/log/ntp.log && /usr/sbin/hwclock --systohc --utc &>/dev/null#

#try this - runs every ten minutes#
#1 * * * * root /usr/sbin/hwclock -s &>/dev/null#
#0,10,20,30,40,50 * * * * root /opt/bin/ntpclient -h pool.ntp.org -s &>/dev/null
#0,10,20,30,40,50 * * * * root /usr/sbin/hwclock --systohc &>/dev/null

#runs every hour#
0 * * * * root /opt/bin/ntpclient -h pool.ntp.org -s &>/dev/null
0 * * * * root /usr/sbin/hwclock --systohc &>/dev/null

#Try this to add day to log (will overwrite every week)
#55 10 * * * root /public/rt2mei/rt2mei -f -new -mt >/public/rt2mei/rt2mei_log.`date +%a` 2>&1
#removed -new flag 8.3.13, script wasn't completing
#55 10 * * * root /public/rt2mei/rt2mei -f -mt >/public/rt2mei/rt2mei_log.`date +%a` 2>&1
#21/3/14
#Disabled rt2mei (line above) enabled as2mei (below)
55 10 * * * root /public/as2mei/as2mei -f >/public/as2mei/as2mei_log.`date +%a` 2>&1
#55 10 * * * root /public/rt2mei/rt2mei -f -new -mt >/public/rt2mei/rt2mei_log.`date +%a-%H-%M` 2>&1

#these might be useful sometime#
#0 23 * * 6 root /usr/sbin/DO_ScanDisk /dev/sda1 &>/dev/null

#@reboot root /opt/bin/ntpclient -h pool.ntp.org -s &>/dev/null

#MWI mei update
#Temporarily disabled 5_3_09

#10 11 * * * root /opt/bin/php /opt/share/www/mwi/getmei.php
#*/5 * * * * root /opt/bin/php /opt/share/www/mwi/getnonmei.php

#try below
#0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /opt/bin/php /opt/share/www/mwi/getnonmei.php
#The line for getmei.php uploads the mei_data - this is the longest operation approx 1:45 for 2 weeks of mei data,
#so this cron job does it once a day at 8am - pick a time when you know the toppy is likely to be on.
#The line for getnonmei.php uploads the mystuff api output files, set the */5 to be the api processing frequency
#on your Z4 option of mystuff, in my case I have it set to 5 minutes.

#The ntpclient lines synchronize the slug clock.

#try this to run toppyemail service at reboot
#@reboot root /public/EmailViewer/toppyemail.sh
#this shows as 'malformed input line'
#run toppyemail service every ten minutes
#*/10 * * * * root /public/EmailViewer/toppyemail.sh
#runs Clara email every 12 minutes
#*/12 * * * * root /public/EmailViewer/toppyemail_clara.sh
#try this - runs once a day
#0 0 * * * root /public/EmailViewer/toppyemail.sh
There is lots in my file which is disabled, things I've tried, disabled and left for reference, etc.
As you can see, everything starting with a hash sign is disabled, so there is very little in the file that actually runs.
You should be able to work out the timing convention from the notes.

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.6;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message
machare
Posted: Sun Nov 09, 2014 12:59 pm Reply with quote
Frequent contributor Joined: 14 Jun 2005 Posts: 111
Thanks. I have found and changed /etc/crontab, but my tasks do not appear to run.


Is there something that I should do to make sure that this crontab file is used?

I tried rebooting the device but that did not do anything.

_________________
Michael Chare

TF5800, IA On, TS On, F/W: 5.13.65T 14/4/2009 +CwOtTd
TAPs: Power Manager v1.2; Jag's EPG v3.0 Beta 5 (Freeware Edition); PcControl X25a; MyInfo B5.6;
View user's profile Send private message
shenson
Posted: Sun Nov 09, 2014 1:12 pm Reply with quote
Frequent contributor Joined: 11 Apr 2005 Posts: 554 Location: Stoke On Trent
Have you installed "cron" using the ipkg tool?

_________________
TF5800, IA On, F/W: MS6 Recommended F/W 12/9/2009 -Fm+EvEzMPeUUuWf
TAPs: PcControl B1.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyInfo B5.6; MyStuff 6.5; SecCache (UK) v0.4; TAP Commander 1.34; UK Subtitle 1.9;
Sig generated by MyInfo on 12/7/14
View user's profile Send private message Visit poster's website
ccs
Posted: Sun Nov 09, 2014 1:20 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 1936 Location: E Yorkshire Belmont Transmitter
"crontab -l" should list the crontab file.

The "ps" command can be used to see if cron is running. (parameter something like -gaux )

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message
machare
Posted: Sun Nov 09, 2014 2:42 pm Reply with quote
Frequent contributor Joined: 14 Jun 2005 Posts: 111
Cron was not installed! But when I do try to install it the device runs out of free space.

Is there a way that I can free up space?

_________________
Michael Chare

TF5800, IA On, TS On, F/W: 5.13.65T 14/4/2009 +CwOtTd
TAPs: Power Manager v1.2; Jag's EPG v3.0 Beta 5 (Freeware Edition); PcControl X25a; MyInfo B5.6;
View user's profile Send private message
ccs
Posted: Sun Nov 09, 2014 2:51 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 1936 Location: E Yorkshire Belmont Transmitter
There could be log files, crash files, /tmp files, accounting files - basically remove any unwanted files, but be careful.

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message
Bizman
Posted: Sun Nov 09, 2014 2:54 pm Reply with quote
Frequent contributor Joined: 06 Apr 2010 Posts: 1037 Location: Taunton, Somerset
There is a mass of info at http://www.nslu2-linux.org/ . The native firmware has very limited space and many people use external USB memory and a more powerful Linux.

_________________
TF5810, TS On, F/W: 5.15.09T 4/9/2009 -AbFmTe+EzHsVb
TAPs: EIT Sub (Game) v0.6; SecCache (UK) v0.4; MHEG On/Off A3; MPDisplayLITE V1.2; MyInfo B5.6; (fsSave 1.1);
Sig generated by MyInfo on 8/11/14

PSU Caps 2/2011 Tx: Mendip. TV: Bush L322LED (22"), UPS, DVD-R: Panasonic DMR EH-50, STB: Labgear FV300. PC Acer Aspire One with Win7
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum