Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old March 13th, 2008, 11:12 PM
Jesdisciple Jesdisciple is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Tejas
Posts: 9 Jesdisciple User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 29 sec
Reputation Power: 0
Send a message via AIM to Jesdisciple Send a message via MSN to Jesdisciple Send a message via Google Talk to Jesdisciple
NT Batch - Double 'at' Command

I expect that this will be a very short thread; I just need to confirm my syntax.

I want to schedule a command for a certain day (e.g. the 15th of next month) then have the command repeat at each occurrence of the specified interval (e.g. every Tuesday).

The following XML describes the syntax that needs confirmation. My PHP app will locate the "Windows NT" schedule-command, get its parameter names, extract the CDATA, and preg_replace() the %-enclosed names with their corresponding values.
Code:
XML Code:
Original - XML Code
  1. <scheduleCommand systems="Windows%20NT" parameters="hour0 minute0 day0 hour1 minute1 day1 command"><![CDATA[
  2.     at %hour0%:%minute0% /next:%day0% at %hours1%:%minutes1% /interactive /every:%day1% %command%
  3. ]]></scheduleCommand>


That just looks like a mess to me, so I doubt you want to pore over it just to help me. So here are two examples of what the PHP might get as a result of using preg_replace() as specified above (where 'dowhatever' is the command):
  • at 0:0 /next:15 at 17:30 /interactive /every:T dowhatever
  • at 23:0 /next:W at 2:15 /interactive /every:4 dowhatever

Is that right? Thanks!

Reply With Quote
  Trader Rating: 1 · #2  
Old March 14th, 2008, 10:24 AM
weevilofdoom's Avatar
weevilofdoom weevilofdoom is offline
BLURG
Dev Hardware Loyal (3000 - 3499 posts)
 
Join Date: Sep 2004
Location: Oregon
Posts: 3,418 weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)  Folding Points: 32443 Folding Title: Starter FolderFolding Points: 32443 Folding Title: Starter Folder
Time spent in forums: 2 Months 20 h 45 m 35 sec
Reputation Power: 3311
Send a message via ICQ to weevilofdoom Send a message via AIM to weevilofdoom Send a message via MSN to weevilofdoom Send a message via Yahoo to weevilofdoom Send a message via Google Talk to weevilofdoom
Why not just use the "Scheduled Tasks" built into windows? You'll find it in the control panel...
__________________

Reply With Quote
  Trader Rating: 0 · #3  
Old March 14th, 2008, 02:31 PM
Jesdisciple Jesdisciple is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Tejas
Posts: 9 Jesdisciple User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 29 sec
Reputation Power: 0
Send a message via AIM to Jesdisciple Send a message via MSN to Jesdisciple Send a message via Google Talk to Jesdisciple
I'm building a server application that needs to regularly prune its database, and it can only use the command line.

Reply With Quote
  Trader Rating: 0 · #4  
Old March 14th, 2008, 03:20 PM
Sand Man's Avatar
Sand Man Sand Man is offline
¯\(º_o)/¯
Dev Hardware Loyal (3000 - 3499 posts)
 
Join Date: Jun 2005
Location: in a daydream
Posts: 3,432 Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 53rd Grade (Above 100000 Reputation Level)  Folding Points: 140129 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140129 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140129 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140129 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140129 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140129 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 9 h 7 m 30 sec
Reputation Power: 4494
Send a message via MSN to Sand Man Send a message via Google Talk to Sand Man
what database are you using? mysql, sql server, oracle?
__________________
How much net work could a network work, if a network could net work?

Reply With Quote
  Trader Rating: 0 · #5  
Old March 14th, 2008, 04:04 PM
Jesdisciple Jesdisciple is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Tejas
Posts: 9 Jesdisciple User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 29 sec
Reputation Power: 0
Send a message via AIM to Jesdisciple Send a message via MSN to Jesdisciple Send a message via Google Talk to Jesdisciple
Quote:
Originally Posted by Sand Man
what database are you using? mysql, sql server, oracle?
I'm starting with MySQL, then I plan to port to Derby and any others I can get a hold of.

Reply With Quote
  Trader Rating: 1 · #6  
Old March 14th, 2008, 06:26 PM
weevilofdoom's Avatar
weevilofdoom weevilofdoom is offline
BLURG
Dev Hardware Loyal (3000 - 3499 posts)
 
Join Date: Sep 2004
Location: Oregon
Posts: 3,418 weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)weevilofdoom User rank is General 35th Grade (Above 100000 Reputation Level)  Folding Points: 32443 Folding Title: Starter FolderFolding Points: 32443 Folding Title: Starter Folder
Time spent in forums: 2 Months 20 h 45 m 35 sec
Reputation Power: 3311
Send a message via ICQ to weevilofdoom Send a message via AIM to weevilofdoom Send a message via MSN to weevilofdoom Send a message via Yahoo to weevilofdoom Send a message via Google Talk to weevilofdoom
A scheduled task can fire off a php script that will do that ... you can even pass command line args... this is NOT your only option.

Reply With Quote
  Trader Rating: 0 · #7  
Old March 19th, 2008, 06:17 PM
Jesdisciple Jesdisciple is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Tejas
Posts: 9 Jesdisciple User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 29 sec
Reputation Power: 0
Send a message via AIM to Jesdisciple Send a message via MSN to Jesdisciple Send a message via Google Talk to Jesdisciple
Quote:
Originally Posted by weevilofdoom
A scheduled task can fire off a php script that will do that ... you can even pass command line args... this is NOT your only option.
I'm sorry, I was not aware that you had replied.

I understand that a scheduled task can use the command line, but I need the command line to schedule a task (because the task needs to be scheduled by a program rather than the user).

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > NT Batch - Double 'at' Command


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway