LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] CRONTAB & %

[ILUG] CRONTAB & %

Kevin Lyda kevin at ie.suberic.net
Tue May 15 09:34:18 IST 2012


On Mon, May 14, 2012 at 5:21 PM, Frank Murphy <frankly3d at gmail.com> wrote:
> crontab -e:
> 0 6 * * 2 [ `date +%e` -gt 1 -a `date +%\e` -lt 7 ] && <MY COMMAND>
>
> Have I the backslash in the correct place?
>
> Trying to do 1st Tuesday of each month.

Pádraig pointed out the right solution.  BTW, I generally avoid using
user crontabs and instead use system crontabs to manage services.  It
fits in easier with slack or puppet for managing servers.  The
downside is that system crontabs are not checked at all.  I wrote the
following which would have warned on the above crontab (if it was in
the seven field system crontab format):

http://code.google.com/p/chkcrontab/

Kevin

-- 
Kevin Lyda
Dublin, Ireland
US Citizen overseas? We can vote.
Register now: http://www.votefromabroad.org/


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell