Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 14 of 14

Thread: Scheduled Tasks

  1. #1
    Join Date
    Nov 2006
    Posts
    233

    Scheduled Tasks

    Anyone know how, or even if its possible to add a sheduled task using AMS??

  2. #2
    Join Date
    Oct 2006
    Posts
    209

    Wink Scheduler

    ask Scheduler options are stored in the registry in this location:
    Code:
    HKLM\SOFTWARE\Microsoft\SchedulingAgent\
    here is example Create a daily task to run at 11 pm:
    Code:
    SCHTASKS /Create /SC weekly /D MON,TUE,WED,THU,FRI /TN MyDailyBackup /ST 23:00:00 /TR c:\backup.cmd /RU MyDomain\MyLogin /RP MyPassword
    and you can check help just typing
    Code:
    SCHTASKS/?
    all this is from command prompt but you can add it in ams you know your self how to do this.

  3. #3
    Join Date
    Nov 2006
    Posts
    233
    if I type SCHTASKS/? into the command prompt I get

    "SCHTASKS is not recognised as an internal or external command, operable program or batch file"

  4. #4
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    You need to put a space before the /
    schtasks /?

    Yossi

  5. #5
    Join Date
    Oct 2006
    Posts
    209

    Smile i can give you example

    Desrat if you want i can give you example in ams to run some software on particular date time and day.

  6. #6
    Join Date
    Nov 2006
    Posts
    233
    that would be cool thx

  7. #7
    Join Date
    Oct 2006
    Posts
    209

    Smile example

    example to if you need any further help i can do this for you.
    Attached Files

  8. #8
    Join Date
    Nov 2006
    Posts
    233
    I just dont think SCHTASKS works for me, I changed the code to this to test it

    File.Run("SCHTASKS", "/Create /SC weekly /D FRI /TN desrat /ST 12:47:00 /TR c:\xfcgsg.exe", "", SW_MINIMIZE, false);

    and it doesnt even add the task (checking from C:\Windows\Tasks folder)

    Ive read and re-read all the info on microsoft regarding SCHTASKS and none of it works for me, however the "at" method works but is useless in my case because the task runs hidden even when using the /interactive flag.

    I'm completely clueless as to what to do next....I have noticed that SCHTASKS is available on my Server2003 machine so is it an XP home limitation?

    EDIT. schtasks can be found in the windows\system32 dir on my server03 machine, but is not there on XP home...
    Last edited by Desrat; 05-04-2007 at 06:05 AM.

  9. #9
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    you might have to quote your code like this and add another backslash for the one backslash to be recognized.

    File.Run("SCHTASKS", "\"/Create /SC weekly /D FRI /TN desrat /ST 12:47:00 /TR c:\\xfcgsg.exe\"", "", SW_MINIMIZE, false);

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  10. #10
    Join Date
    Nov 2006
    Posts
    233
    thanks Tigg but the schtasks.exe doesnt even exist on my PC so I'm calling a non existant file anyway...

  11. #11
    Join Date
    Oct 2006
    Posts
    209

    Smile

    sorry Desrat,
    you are right one xp home there is no SCHTASKS command if i m not wrong you can use AT command and as far as my knowledge you can include SCHTASKS in your ams docs folder and run it from there and SCHTASKS can be found on Resource Kit (you can download it from ms web site for free). but if AT do for you or you can include both AT and SCHTASKS and before running any of them add script to check os and then run appropriate command.
    TJ_Tigger you dont have to ad any extra \ or /.
    Last edited by wasim21k; 05-04-2007 at 09:10 AM.

  12. #12
    Join Date
    Nov 2006
    Posts
    233
    ok well I put the schtasks.exe in my project and after some fiddling got a workable result, with one major drawback. If there is no password set for the current user account the task will not start. My idea was to get my app to do an auto update at the users discression and now im just gonna force an update check on preload, its much less complicated

  13. #13
    Join Date
    Jul 2007
    Posts
    1
    first of all Sorry for my English I am French and I use a translator
    Personally I use command AT with a XP Pro the command schtasks does not work for me. Here is an example

    for 1 execution
    Code:
    File.Run("at", "05:22 c:\\test.exe", "", SW_SHOWNORMAL, false);
    For week execution
    Code:
    File.Run("at", "05:22 /every:M,T,W,Th,F,S,Su c:\\test.exe", "", SW_SHOWNORMAL, false);
    Visit For more instruction
    http://www.microsoft.com/resources/d....mspx?mfr=true

  14. #14
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    You should be able to add the parameter /RU SYSTEM which will force the task to run as the SYSTEM account without a password.

    You can always create the job manually (using the SYSTEM account) & then just copy the *.JOB files into C:\WINDOWS\TASKS. However it is random whether the job retains its RUN AS option as I have found out in the past so better to use the first option.

    As you have worked out, Windows Home by default, does not normally allow you to add Scheduled Tasks via a command line. Bit like the fact NTBACKUP is not installed by default but can be from the CD.

    Assume you have checked out: http://support.microsoft.com/default.aspx/kb/814596/

    Rgds John

Similar Threads

  1. Install as Scheduled Task
    By MGC in forum Setup Factory 7.0
    Replies: 2
    Last Post: 03-25-2007, 03:11 AM
  2. how create scheduled task?
    By 6lickdrdunDchics in forum Setup Factory 6.0
    Replies: 0
    Last Post: 07-09-2002, 07:34 AM
  3. Running tasks at the same time ..
    By melanie_seba in forum AutoPlay Menu Studio 3.0
    Replies: 2
    Last Post: 01-27-2002, 04:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts