Cron configuration file Readynas

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Cron configuration file Readynas

Postby pk_fox » Mon May 13, 2013 10:55 am

Hi all, I have a readynas nv NAS box and have set up a cron job to backup my stuff to an external hd, all works fine but I would like to tweak some cron settings but I can't find a *.conf file for cron ! any ideas where it might reside ? uname -a returns this

Linux nas 2.6.17.14ReadyNAS #1 Wed Jun 20 20:08:20 PDT 2012 padre unknown

I have a feeling it is a flavour of Debian ( from memory )
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Mon May 13, 2013 11:09 am

What do you want to tweak? Most settings are set in the crontab files. See man 5 crontab

An active line in a crontab will be either an environment setting or a cron command. An environment setting is of the form,

name = value
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby pk_fox » Mon May 13, 2013 11:29 am

Hi Nelz, all I want to do is receive an email when the job finishes, unfortunately the Linux system on the NAS doesn't have man pages installed and I currently don't have Linux installed anywhere else


nelz wrote:What do you want to tweak? Most settings are set in the crontab files. See man 5 crontab

An active line in a crontab will be either an environment setting or a cron command. An environment setting is of the form,

name = value
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Mon May 13, 2013 12:39 pm

There are plenty of site that put man pages online, such as http://linux.die.net/man/5/crontab

Cron sends an email of the job's output automatically, as long as you tell it where to send it by setting MAILTO=you@your.email at the top of the crontab. If the job gives no output on successful completion, which is usually desirable, you only want to know when something is wrong, you can call the command from a script

Code: Select all
#!/bin/sh
yourcommand
echo "Command finished"


and have cron run that script.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby pk_fox » Mon May 13, 2013 12:44 pm

Ok, so if I edit the crontab with crontab -e and enter what you suggest I'll be good to go ? Thanks for your help

nelz wrote:There are plenty of site that put man pages online, such as http://linux.die.net/man/5/crontab

Cron sends an email of the job's output automatically, as long as you tell it where to send it by setting MAILTO=you@your.email at the top of the crontab. If the job gives no output on successful completion, which is usually desirable, you only want to know when something is wrong, you can call the command from a script

Code: Select all
#!/bin/sh
yourcommand
echo "Command finished"


and have cron run that script.
User avatar
pk_fox
LXF regular
 
Posts: 298
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK


Return to Help!

Who is online

Users browsing this forum: No registered users and 0 guests