<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to schedule a batch file in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880562#M79464</link>
    <description>Gerry,&lt;BR /&gt;&lt;BR /&gt;simply add&lt;BR /&gt;&lt;BR /&gt;$ SUBMIT &lt;THE_PROCEDURE&gt; /AFTER="TOMORROW+3:00"&lt;BR /&gt;&lt;BR /&gt;As (nearly) the first line in &lt;THE_PROCEDURE&gt;&lt;BR /&gt;&lt;BR /&gt;There are (much) more elegant solutions around, that take the weekday in account, and all kinds of error handling, and conditional processing etc,&lt;BR /&gt;but basically, the above solves what you are asking.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;PS.&lt;BR /&gt;from your profile:&lt;BR /&gt;I have assigned points to 7 of 68 responses.&lt;BR /&gt;-one of those dates back to 2004.&lt;BR /&gt;Perhaps time to catch up?&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;/THE_PROCEDURE&gt;&lt;/THE_PROCEDURE&gt;</description>
    <pubDate>Mon, 16 Oct 2006 04:30:13 GMT</pubDate>
    <dc:creator>Jan van den Ende</dc:creator>
    <dc:date>2006-10-16T04:30:13Z</dc:date>
    <item>
      <title>how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880561#M79463</link>
      <description>Hi all,&lt;BR /&gt;      I need to write a command file that will run an FTP procedure at 03:00 every night. I have the procedure working&lt;BR /&gt;so far as I can get it to run immediately, but dont know how to schedule it for that time. I presume I will have to submit it to a batch queue, but can anyone suggest&lt;BR /&gt;how I schedule it to run at that time?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Gerry</description>
      <pubDate>Mon, 16 Oct 2006 04:12:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880561#M79463</guid>
      <dc:creator>Gerry Downey</dc:creator>
      <dc:date>2006-10-16T04:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880562#M79464</link>
      <description>Gerry,&lt;BR /&gt;&lt;BR /&gt;simply add&lt;BR /&gt;&lt;BR /&gt;$ SUBMIT &lt;THE_PROCEDURE&gt; /AFTER="TOMORROW+3:00"&lt;BR /&gt;&lt;BR /&gt;As (nearly) the first line in &lt;THE_PROCEDURE&gt;&lt;BR /&gt;&lt;BR /&gt;There are (much) more elegant solutions around, that take the weekday in account, and all kinds of error handling, and conditional processing etc,&lt;BR /&gt;but basically, the above solves what you are asking.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;PS.&lt;BR /&gt;from your profile:&lt;BR /&gt;I have assigned points to 7 of 68 responses.&lt;BR /&gt;-one of those dates back to 2004.&lt;BR /&gt;Perhaps time to catch up?&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;/THE_PROCEDURE&gt;&lt;/THE_PROCEDURE&gt;</description>
      <pubDate>Mon, 16 Oct 2006 04:30:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880562#M79464</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-10-16T04:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880563#M79465</link>
      <description>Gerry,&lt;BR /&gt;&lt;BR /&gt;you use the /AFTER qualifier to specify the start time of a batchjob, e.g.&lt;BR /&gt;$ SUBMIT myproc /AFTER="TOMORROW+03:00:00"&lt;BR /&gt;&lt;BR /&gt;You may place this command at the top of your procedure, e.g.&lt;BR /&gt;$ If F$MODE().eqs."INTERACTICE"&lt;BR /&gt;$ THEN&lt;BR /&gt;$  SUBMIT ...&lt;BR /&gt;$  EXIT&lt;BR /&gt;$ ELSE&lt;BR /&gt;$  SUBMIT..&lt;BR /&gt;$  ...! the actual work&lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;To make the routine bulletproof you may add logic to check for an already submitted job...&lt;BR /&gt;&lt;BR /&gt;Another way would be to use tools like CRON.&lt;BR /&gt;Search the forum, there was a recent thread about scheduling.&lt;BR /&gt;&lt;BR /&gt;regards Kalle&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Oct 2006 04:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880563#M79465</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-10-16T04:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880564#M79466</link>
      <description>Gerry,&lt;BR /&gt;&lt;BR /&gt;I concur with Jan and Karl.&lt;BR /&gt;&lt;BR /&gt;I will add a note that you need to deal with the possibility of that either:&lt;BR /&gt;&lt;BR /&gt;- the job may not resubmit itself; or&lt;BR /&gt;- multiple copies of the job being present&lt;BR /&gt;&lt;BR /&gt;Once can get into these situations in various failure scenarios.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Mon, 16 Oct 2006 05:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880564#M79466</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2006-10-16T05:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880565#M79467</link>
      <description>To make Karls advice fully generic (i.e. independaent of file-name and queue), use this sequence:&lt;BR /&gt;&lt;BR /&gt;$ proc = f$environment("PROCEDURE")&lt;BR /&gt;$!remove version from procedure name, so that one can change the file and&lt;BR /&gt;$!activate the new version without canceling the job:&lt;BR /&gt;$ proc = proc-f$parse(proc,,,"VERSION","SYNTAX_ONLY")&lt;BR /&gt;$ write sys$output f$getqui ( "DISPLAY_QUEUE", "QUEUE_NAME", "*", "THIS_JOB" )&lt;BR /&gt;$ myqueue = f$getqui ( "DISPLAY_QUEUE", "QUEUE_NAME", "*", "THIS_JOB" )&lt;BR /&gt;$!resubmit this job to run TOMORROW MORNING&lt;BR /&gt;$ SUBMIT/AFTER="TOMORROW+3"/LOG/noprint/queue='myqueue' 'proc'&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Oct 2006 08:00:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880565#M79467</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2006-10-16T08:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880566#M79468</link>
      <description>@Joseph:&lt;BR /&gt;&lt;BR /&gt;I usually just ask to use the highest version: ("proc" as in your example)&lt;BR /&gt;&lt;BR /&gt;$ Proc = f$parse(";0",f$environment("procedure"))&lt;BR /&gt;&lt;BR /&gt;If any related filespecs are needed, eg:&lt;BR /&gt;&lt;BR /&gt;$ errfil = f$parse(".err;0",proc)&lt;BR /&gt;&lt;BR /&gt;etc..&lt;BR /&gt;&lt;BR /&gt;but that does not change the principle.&lt;BR /&gt;&lt;BR /&gt;fwiw&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Oct 2006 10:13:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880566#M79468</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-10-16T10:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880567#M79469</link>
      <description>Jan: &lt;BR /&gt;  &amp;lt;&amp;lt; $ Proc = f$parse(";0",f$environment("procedure"))&lt;BR /&gt;&lt;BR /&gt;There is a subtle difference vs. subraction the version from f$environment("procedure"):&lt;BR /&gt;your f$parse still gets a version number in the result. Now this usually makes no difference if  it is used immediately afterwards. But if there  is something (like generating a new version) in between, then it is not what you want.&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Oct 2006 10:28:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880567#M79469</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2006-10-16T10:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880568#M79470</link>
      <description>Well , I should try it before answering:&lt;BR /&gt;in fact the only difference is &lt;BR /&gt;  "file;0" vs. "file" in the result.&lt;BR /&gt;So effectively no difference wether f$parse is followed immediatley by submit or not.&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Oct 2006 02:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880568#M79470</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2006-10-17T02:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule a batch file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880569#M79471</link>
      <description>Thanks everyone, your replies have been very helpful. I will attempt to get it working ASAP  (and yes, I'll get round to assigning those points) :-)&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Oct 2006 04:57:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-schedule-a-batch-file/m-p/3880569#M79471</guid>
      <dc:creator>Gerry Downey</dc:creator>
      <dc:date>2006-10-17T04:57:09Z</dc:date>
    </item>
  </channel>
</rss>

