Fedora Linux Support Community & Resources Center
  #1  
Old 2nd May 2017, 02:50 PM
micahel8773 Offline
Registered User
 
Join Date: Nov 2016
Location: Cape Canaveral
Posts: 14
windows_7chrome
cron Job Spanning Multiple Weekdays

Hello, I have a cron job I want to run Monday-Thursday and Sunday. All days except Friday.

I know I could do it this way:
Code:
00 17 * * 0-4 myjob.sh 2>&1
00 17 * * 6 myjob.sh 2>&1
I was wondering if I could combine it all on one line. Would this work?
Code:
00 17 * * 0-4,6 myjob.sh 2>&1
Thanks for your advice,

Michael
Reply With Quote
  #2  
Old 3rd May 2017, 01:56 AM
donatom Offline
Registered User
 
Join Date: Jan 2013
Location: Ventura, CA
Posts: 49
linuxfirefox
Re: cron Job Spanning Multiple Weekdays

Yes, that should work. So would 00 17 * * 0-4,sat myjob.sh

You could also list all of the days you want (sun,mon,etc) but that would be more work.
Reply With Quote
  #3  
Old 3rd May 2017, 12:11 PM
micahel8773 Offline
Registered User
 
Join Date: Nov 2016
Location: Cape Canaveral
Posts: 14
windows_7chrome
Re: cron Job Spanning Multiple Weekdays

donatom thanks very much!
Reply With Quote
Reply

Tags
cron, job, multiple, spanning, spanningweekdays, weekdays

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No output from cron jobs in /etc/cron.daily marriedto51 Using Fedora 3 3rd February 2011 11:57 AM
c++ ! Anyone ? Minimum spanning tree overule Programming & Packaging 6 5th October 2005 12:36 PM
Help with spanning desktop MaxDraco Hardware & Laptops 4 1st October 2005 06:33 PM
drive spanning? LinuxHippy Using Fedora 2 22nd December 2004 12:08 AM


Current GMT-time: 14:14 (Thursday, 29-06-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat