home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,615 of 68,980   
   Mike Sanders to All   
   every-10-days.cmd   
   06 Aug 20 12:21:12   
   
   74e52cee   
   From: mike@porkchop.bsd   
      
   Nice 'bit of kit' here. Allows you run your script   
   only on certain days. Just using plain 'ol modulus.   
      
   Users outside of the US: Watch out for the date   
   parsing routine, because %date% is locale specific   
   (for details see ).   
      
   Enjoy!   
      
   win:   
      
      @ echo off   
      
      :: runs only on: 1st, 10th, 20th, or 30th day of the month   
      
      set    x=%date:~7,2%   
      set /a y=%x% %% 10   
      set    z=0   
      
      if %x% equ 1 (set z=1) else if %y% equ 0 (set z=1)   
      if not %z% equ 1 exit /b   
      
      echo start your script here...   
      
      :eof   
      
   sh:   
      
      #!/bin/sh   
      
      # runs only on: 1st, 10th, 20th, or 30th day of the month   
      
      d=$(date +%d)   
      [ $((d % 10 )) -eq 0 -o $d -eq 1 ] || exit   
      
      echo start your script here...   
      
     #eof   
      
   --   
   https://busybox.hypermart.net   
   echo zvxr@ohflobk.ulcrezneg.arg | rot13   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca