Welcome, Guest
Username: Password: Remember me

TOPIC: Task Scheduler Backgroup Job Script

Task Scheduler Backgroup Job Script #936

  • Moktarino
  • Moktarino's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Greetings all, I'm new on the forum and will likely have many dumb questions as I support our new ES/Synergy install. To offset what is likely to be a poor ratio, here's a script I wrote to create the synergy background maintenance jobs on a machine that isn't hosting the database ('cos otherwise you'd use the SQL script). This is also handy for changing the account information used to run these jobs without having to manually go through each one.




@ECHO OFF
CLS

:I wouldn't suggest hardcoding the account info into the script.

set /p account="Service Account: "
set /p password="Password for %account%: "


:Customize these variables for your environment:

set server=YOURDBSERVER
set database=ESDATABASENAME
set synpath=C:\Program Files\Synergy\bin
set tempdir=C:\Temp
set exchangelog=C:\Logfiles\Synergy\SynExchangeLog.txt


:Customize commandline options for each job:

Schtasks /create /SC MINUTE /MO 60 /TN HRBgJobs /TR "\"%SYNPATH%\HrBgJobs.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 60 /TN HrMail /TR "\"%SYNPATH%\HrMail.exe\" /S:%SERVER% /D:%DATABASE% /MP:%TEMPDIR%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 30 /TN RPFinancialCheck /TR "\"%SYNPATH%\rpfinancialcheck.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 30 /TN BacoImport /TR "\"%SYNPATH%\bacoimporter.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 30 /TN BacoExcelImport /TR "\"%SYNPATH%\RPExcelImport.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 30 /TN BLProcess /TR "\"%SYNPATH%\BLProcess.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 15 /TN SynergyExchange /TR "\"%SYNPATH%\SynergyExchange.exe\" /S:%SERVER% /D:%DATABASE% /E:HAL /M:0 /L:%EXCHANGELOG%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 10 /TN CustomerStatus /TR "\"%SYNPATH%\BLCustomerStatus.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 10 /TN CustomerStatusDaily /TR "\"%SYNPATH%\BLCustomerStatus.exe\" /S:%SERVER% /D:%DATABASE% /M:1" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC MINUTE /MO 5 /TN ExactFullText /TR "\"%SYNPATH%\ExactFullText.exe\" /S:%SERVER% /D:%DATABASE%" /ST 00:00 /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC DAILY /ST 01:45 /TN CustomerRating /TR "\"%SYNPATH%\CRMRating.exe\" /S:%SERVER% /D:%DATABASE%" /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC DAILY /ST 02:00 /TN CompressAttachments /TR "\"%SYNPATH%\CompressItemAttachments.exe\" /S:%SERVER% /D:%DATABASE% /DP:%TEMPDIR%" /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC DAILY /ST 01:00 /TN Loghandler /TR "\"%SYNPATH%\Loghandler.exe\" /S:%SERVER% /D:%DATABASE%" /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC DAILY /ST 01:00 /TN BDScheduler-Counter /TR "\"%SYNPATH%\BDScheduler.exe\" /S:%SERVER% /D:%DATABASE% /C:Counter" /RU %ACCOUNT% /RP "%PASSWORD%"
schtasks /create /SC DAILY /ST 01:10 /TN BDScheduler-Picture /TR "\"%SYNPATH%\BDScheduler.exe\" /S:%SERVER% /D:%DATABASE% /C:Picture" /RU %ACCOUNT% /RP "%PASSWORD%"

PAUSE
The administrator has disabled public write access.
Time to create page: 0.026 seconds
Powered by Kunena Forum  Protected by R Antispam