Sponsored Content
Top Forums Shell Programming and Scripting crontab entry to run every last day of the month Post 74348 by muthukumar on Thursday 9th of June 2005 07:46:20 AM
Old 06-09-2005
You can try as,
Code:
00 23 * * * [[ $(date +'%d') -eq $(cal | awk '!/^$/{ print $NF }' | tail -1) ]] && job 1>/dev/null 2>&1

hth.

Moderator's Comments:
Mod Comment Code tags please, thanks.

Last edited by zaxxon; 10-20-2011 at 04:55 AM.. Reason: code tags
This User Gave Thanks to muthukumar For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cron to run first day of month to calculate date 3 months ago

Hi, I would like to find out how can i calculate a date which is 3 months ago. I intend to run a cron job on the 1st of every month, and calculate the month 4 months earlier from the date. For example, if today's date is 1st May 2007, i would like to return 012007( January 2007). i can get... (1 Reply)
Discussion started by: new2ss
1 Replies

2. UNIX for Dummies Questions & Answers

cron script -run every 2nd day of month except Monday

I know I can't schedule this in cron and would have to write a wrapper around my script and schedule it in cron ....but not sure how do to this? How do I exclude Monday if the 2nd day of the month falls on a Monday? Thanks. I tried this: 0 0 2 * 0,2-6 command And I know this doesnt... (2 Replies)
Discussion started by: newtou
2 Replies

3. Solaris

crontab entry to run a script on 1st of every month.

What should be the crontab entry in solaris to run a script on 1st of every month? Is this correct? 00 02 1 * * <script to be executed> (5 Replies)
Discussion started by: deepaksahni0109
5 Replies

4. Shell Programming and Scripting

Crontab to skip only one entry in a day???

Hello Friends, I have a cron tab like this: 10,40 1-23 * * * /script i want to skip only one execution at 00:10, so basically i want it to execute every hour at 10th and 40th minute, except 00:10. Could anyone help me doing this Thanks folks :b: (4 Replies)
Discussion started by: Prateek007
4 Replies

5. Shell Programming and Scripting

run the script for last day of the month

Hello Experts, I have a script which i want to run the on last day of every month. let say I have backup.sh script which i want to run it every month last day. Can anyone please help :confused: thanks (4 Replies)
Discussion started by: aks_1902
4 Replies

6. UNIX for Dummies Questions & Answers

Running Script via Crontab on 2nd Working day each month

Hello Guys, I have a questions regarding running a shell script every second working day each month. I have no clue how solve this problem :wall:. Important is that it has to be the second working (Mo-Fr). Example: If 1st and 2nd Days of month are Sat and Sun the script must run on 4th day... (5 Replies)
Discussion started by: Hollo
5 Replies

7. Shell Programming and Scripting

Writing a script to run weekly/monthly - check for weekday or day-of-the-month

Hi all, I currently have a UNIX file maintenance script that runs daily as a cron job. Now I want to change the script and create functions/sub inside it that runs on a weekly or monthly basis. To run all the scripts' daily maintenance, I want to schedule it in cron as simply maint.sh... (1 Reply)
Discussion started by: newbie_01
1 Replies

8. Shell Programming and Scripting

Simpler crontab entry to execute pgm on last day of the month

The following bash command line works for the last day of the month. Test by replacing the 1 with tomorrows day of month number && echo "Day before tomorrow"Can it be used within crontab? As * * 28-31 * * && echo "Today ls last day of month" >>/tmp/crontabtestI tried to test crontab with... (1 Reply)
Discussion started by: lsatenstein
1 Replies

9. Shell Programming and Scripting

Script to run on 2 4 and 7 day of the month

I am looking for a unix script which could run a job on 2, 4 and 7 working day of the month. if the days are falling on the saturday/sunday. it should run on the next day. Thank you.. (9 Replies)
Discussion started by: tradingspecial
9 Replies

10. UNIX for Beginners Questions & Answers

Dynamic crontab entry for day and night

I have query apply crontab entry that the script executes as below day hours (before 8:00 PM and after 7:00 AM) execute every 5 min in Night hours (after 8:00 PM to 7:00 AM) executes every 15 min How can we set such entry in crontab ? (4 Replies)
Discussion started by: kaushik02018
4 Replies
xmonad(1)							   xmonad manual							 xmonad(1)

Name
       xmonad - a tiling window manager

Description
       xmonad  is  a minimalist tiling window manager for X, written in Haskell.  Windows are managed using automatic layout algorithms, which can
       be dynamically reconfigured.  At any time windows are arranged so as to maximize the use of screen real estate.	All features of the window
       manager	are  accessible  purely from the keyboard: a mouse is entirely optional.  xmonad is configured in Haskell, and custom layout algo-
       rithms may be implemented by the user in config files.  A principle of xmonad is predictability: the user should know in advance  precisely
       the window arrangement that will result from any action.

       By  default,  xmonad  provides three layout algorithms: tall, wide and fullscreen.  In tall or wide mode, windows are tiled and arranged to
       prevent overlap and maximize screen use.  Sets of windows are grouped together on virtual screens, and each screen retains its own  layout,
       which may be reconfigured dynamically.  Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of
       screens.

       By utilizing the expressivity of a modern functional language with a rich static type system, xmonad provides a complete, featureful window
       manager	in  less  than	1200 lines of code, with an emphasis on correctness and robustness.  Internal properties of the window manager are
       checked using a combination of static guarantees provided by the type system, and type-based automated testing.	A benefit of this is  that
       the code is simple to understand, and easy to modify.

Usage
       xmonad  places  each  window  into a "workspace".  Each workspace can have any number of windows, which you can cycle though with mod-j and
       mod-k.  Windows are either displayed full screen, tiled horizontally, or tiled vertically.  You can toggle the layout mode with	mod-space,
       which will cycle through the available modes.

       You  can switch to workspace N with mod-N.  For example, to switch to workspace 5, you would press mod-5.  Similarly, you can move the cur-
       rent window to another workspace with mod-shift-N.

       When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible.  mod-{w,e,r} switch the focus between screens,
       while  shift-mod-{w,e,r}  move the current window to that screen.  When xmonad starts, workspace 1 is on screen 1, workspace 2 is on screen
       2, etc.	When switching workspaces to one that is already visible, the current and visible workspaces are swapped.

   Flags
       xmonad has several flags which you may pass to the executable.  These flags are:

       --recompile
	      Recompiles your configuration in ~/.xmonad/xmonad.hs

       --restart
	      Causes the currently running xmonad process to restart

       --replace
	      Replace the current window manager with xmonad

       --version
	      Display version of xmonad

       --verbose-version
	      Display detailed version of xmonad

   Default keyboard bindings
       mod-shift-return
	      Launch terminal

       mod-p  Launch dmenu

       mod-shift-p
	      Launch gmrun

       mod-shift-c
	      Close the focused window

       mod-space
	      Rotate through the available layout algorithms

       mod-shift-space
	      Reset the layouts on the current workspace to default

       mod-n  Resize viewed windows to the correct size

       mod-tab
	      Move focus to the next window

       mod-shift-tab
	      Move focus to the previous window

       mod-j  Move focus to the next window

       mod-k  Move focus to the previous window

       mod-m  Move focus to the master window

       mod-return
	      Swap the focused window and the master window

       mod-shift-j
	      Swap the focused window with the next window

       mod-shift-k
	      Swap the focused window with the previous window

       mod-h  Shrink the master area

       mod-l  Expand the master area

       mod-t  Push window back into tiling

       mod-comma
	      Increment the number of windows in the master area

       mod-period
	      Deincrement the number of windows in the master area

       mod-b  Toggle the status bar gap

       mod-shift-q
	      Quit xmonad

       mod-q  Restart xmonad

       mod-[1..9]
	      Switch to workspace N

       mod-shift-[1..9]
	      Move client to workspace N

       mod-{w,e,r}
	      Switch to physical/Xinerama screens 1, 2, or 3

       mod-shift-{w,e,r}
	      Move client to screen 1, 2, or 3

       mod-button1
	      Set the window to floating mode and move by dragging

       mod-button2
	      Raise the window to the top of the stack

       mod-button3
	      Set the window to floating mode and resize by dragging

Examples
       To use xmonad as your window manager add to your ~/.xinitrc file:

	      exec xmonad

Customization
       xmonad is customized in ~/.xmonad/xmonad.hs, and then restarting with mod-q.

       You can find many extensions to the core feature set in the xmonad- contrib  package,  available  through  your	package  manager  or  from
       xmonad.org (http://xmonad.org).

   Modular Configuration
       As  of  xmonad-0.9, any additional Haskell modules may be placed in ~/.xmonad/lib/ are available in GHC's searchpath.  Hierarchical modules
       are supported: for example, the file ~/.xmonad/lib/XMonad/Stack/MyAdditions.hs could contain:

	      module XMonad.Stack.MyAdditions (function1) where
		  function1 = error "function1: Not implemented yet!"

       Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib.

Bugs
       Probably.  If you find any, please report them to the bugtracker (http://code.google.com/p/xmonad/issues/list)

xmonad-0.10							   25 October 09							 xmonad(1)
All times are GMT -4. The time now is 10:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy