Search found 13 matches

by batchfile
09 Apr 2013 21:00
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

You have a scheduled task that runs every 30 days and you cant wait 10 more minutes for it to run? Do you know how anal retentive that sounds? lol...the program is suppose to be one file that runs automatically at boot not wanting the user to do anything manual so waiting 10 minutes is irrelevant a...
by batchfile
09 Apr 2013 19:13
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

abc0502 wrote:sorry the function i posted has error, i will update the post again.


Cool am making burrito so should sync with new post soon...
by batchfile
09 Apr 2013 19:06
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

Ok, try this, i hope that what you need There will be no check.bat or other batch files, just one. Put that batch in the start-up folder or in the registry, and when it runs it do the following: Check to see if a log file exist: [+] IF not that means it is the first time and it will create a log fi...
by batchfile
09 Apr 2013 17:54
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

I am tapping out on this one. I have no idea what you are trying to do and why. If you are recreating the scheduled task which you can do by using the /F switch to force it then you might as well build an XML file to set the "Run task if it was missed" option. The Scheduler service polls ...
by batchfile
09 Apr 2013 17:24
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

Remember Task B when it runs gets re-created and thus Check.bat must take that into account This confuses the hell out of me. Are you saying the executable that Task B runs recreates the Scheduled task? If that is the case then it would also have to delete the previous scheduled task. Which makes n...
by batchfile
09 Apr 2013 16:26
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

I have a suggestion, You don't set a specific time the task run in every 30 days, then why you don't just skip the task scheduled, it make too many troubles, you can't take the query as it might be different from system to other like xp and 7 and you must make the exe file create some sort of a log...
by batchfile
09 Apr 2013 14:39
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

I'm not really sure about your needs- but you can try this. It does: - get the current Julian Day - get the last stored Julian Day from a .sav file, build one if it not exists - check the difference between today and the stored Julian Day - if the difference is greater than 29 it might start your t...
by batchfile
09 Apr 2013 11:41
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

Well as long as someone is willing to placate you that is fine. I tend to do things as efficiently and with as little effort as possible. Have you determined how we are going to know if your program.exe ran? Does it create a log file for us to check the date? Since this an automated deal efficient ...
by batchfile
09 Apr 2013 11:03
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

I want to see, if my date function works for you, so: please post the output from this code: echo off&setlocal for /f "tokens=2*" %%a in ('reg query "HKCU\Control Panel\International" /v sShortDate^|find "REG_SZ"') do set "ssShortDate=%%b" reg add "H...
by batchfile
09 Apr 2013 08:36
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

I'm not needing help with task settings or task Those things are fine My posts are about the Check.bat I want to write Let me reiterate I'm using the startup task only as a measure if computer was off when 30 day task was suppose to run So the start up task runs Check.bat and it somehow through date...
by batchfile
09 Apr 2013 03:55
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

Thanks for the description. How do you run your program every 30 days? By task scheduler? I have the code to create both tasks One runs at startup schtasks /create /tn "Task A" /tr "%SystemDrive%\Check.bat" /sc onstart /ru "" >NUL The other every 30 days schtasks /crea...
by batchfile
09 Apr 2013 03:14
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Re: Could use some help with how to do batch code?

Are you running task B as a scheduled task every month? What do you need to do? Please clarify. Task B runs every 30 days not monthly since months are uneven in Gregorian calendar. Task B runs a program I need to run exactly every 30 days Problem is if computer is off when Task B should run it does...
by batchfile
09 Apr 2013 01:56
Forum: DOS Batch Forum
Topic: Could use some help with how to do batch code?
Replies: 33
Views: 23734

Could use some help with how to do batch code?

Hi, happy to be here 3 Parts: 1. Task A - Runs at start up and triggers Check.bat to run and check if it has been 30 days since Task B has been created 2. Task B - Runs once every 30 days 3. Check.bat - Has code that detects if Task B is 30 days past the day it was created otherwise Check.bat exits ...