1.This Win32 program is used in program docs to execute any console command on schedule such as:
Tell http restart
Show tasks
Example:
Program name: nconsole.exe
Command line: SERVER/ACME "tell smtpmta compact all"
Server to run on: SERVER/ACME
You also have to have the server name in the Administrator section of the server document in the name and address book.
2.RE: Linux Program Document <eom> Daniel Aizenstein 13.Oct.05 09:30 Lotus Notes Domino Administrator 6.5.4Linux - RedHat
3 RE: R5 - Program Documents Colin Fenton 16.Sep.05 12:29 a Web browser Domino Administrator -- Other 5.0.5Windows NT
Another possibility is to put all your compact commands in a batch file (using full path references to ncompact and the database) and then run the batch file with a program document (see KBase doc # 1152740): Program name: nserver Command line: -c "load c:\batch.bat"
You may find that the batch file actually needs to be called "nbatch.bat" Of course you cannot compact any file that is currently in use.
4
Basics Schedule Program name: adminp proc all Enabled/disabled: Enabled Command line: Run at times: 04:00, 16:00 each day Server to run on: SHL-LNMAIL1/SHLTW Repeat interval of: 0 minutes Comments: Days of week: Sun, Mon, Tue, Wed, Thu, Fri, Sat
Program name: COMPACT Enabled/disabled: Enabled Command line: -S 10 Run at times: 04:00 each day Server to run on: SHL-LNMAIL1/SHLTW Repeat interval of: 0 minutes Comments: Days of week: Sun, Mon, Tue, Wed, Thu, Fri, Sat
如何创建程序文档使服务器定时运行某些任务
环境
产品:Lotus Domino 平台:Cross Platform 版本:R5
问题
您可以通过创建程序文档来使服务器定时运行某些任务
解答
1.
启动Administration,连接到指定的服务器,点击"配置"标签
2.
在左边窗口点击"服务器"视图下的"程序"子视图
3.
在右边窗口点击"添加程序"按钮
4.
在"基本"标签下输入:
程序名称:例如compact
命令行参数:例如mail\user.nsf
运行的服务器:例如server1/ou/o
5.
在"定时"标签下输入:
启用定时
运行的时间
重复间隔
每周哪天运行
6.
保存关闭文档
如何配置程序文档来定期运行服务器命令
环境
产品:Lotus Domino Server 平台: Windows 2000 Professional, Windows NT 软件版本: 6.x; 5.x
By jove I think I've fixed it!! The problem wasn't local policy documents, but the problem was in the local names and address book - Program documents found in ($Programs).
It seems that each time a policy document is applied to the client, an associated program document is created, and these do not get cleared down. To overcome this, you can visit each client, open the local name and address book, hold down Shift+Ctrl whilst opening the "View\GoTo" option, and select view ($Programs), then delete all documents that run at 12:00 on a tuesday (3). Alternatively, copy the following code into the PostOpen event of the Database Script of your EMail template (Mail6.ntf - open in design, goto Other\Databaes Resource), then after the 1am designer task runs, the code will be present in each mail file to be run by each client on open. Read the header detail for more info on the code.
The code will EMail notification of what it's done. Some of my users had upwards of 91 program documents, hence the proliferation of compact tasks on a Tuesday midday. Who's responsible for QAing this product!!
Good luck
%REM Mike Hayman - mhayman@bpms.co.uk - 7th April 2004 CODE FOR LOCAL PROGRAM DOCUMENT CLEAR DOWN This code finds and removes and Program documents from the local Address Book that initiate a compact task at noon on a Tuesday
When a policy is applied to a user, and that policy has a local archive requirement, a program document is created in the local directory. These program documents are not always cleared down when the policies are changed. You can see the programs defined locally in view ($Programs) in the local Address Book
This code can be put into the PostOpen event of Database Script in a user database such as the Mail database. It can be removed after a period (say a month) as it only needs to be run once per user.
This code will only run once; controlled by a flag in a profile document within the local Address Book
Set constant c_bNotify to true to send an email to name in constant c_sSendTo Email notification states the number of program documents deleted. If Notify flag set, then will also send notification of any errors encountered.
Set constant bRunForAllUsers to false in order to control the users that run the code by specifying them in arrsUser
Dim arrsUser () As String Dim sess As New NotesSession Dim docProfile As NotesDocument Dim docMail As NotesDocument Dim sUserName As String Dim vAddressBooks As Variant Dim dbAddressBook As NotesDatabase Dim dcProgram As NotesDocumentCollection Dim iProgram As Integer Dim sErrorMessage As String
On Error Goto ErrorHandle
' Only run for specific users If Not c_bRunForAllUsers Then Redim arrsUser (0 To 5) arrsUser(0) = "User1" arrsUser(1) = "User2" arrsUser(2) = "User3" arrsUser(3) = "User4" arrsUser(4) = "User5" arrsUser(5) = "User6" sUserName = sess.CommonUserName If Isnull ( Arraygetindex ( arrsUser, sUserName)) Then Exit Sub End If ' Do not run for all users
' Get local address book vAddressBooks = sess.AddressBooks Forall f_Db In vAddressBooks If f_Db.IsPrivateAddressBook Then Set dbAddressBook = f_Db Exit Forall End If End Forall
If Not dbAddressBook Is Nothing Then If Not dbAddressBook.IsOpen Then dbAddressBook.Open "", "" ' Check that have not run before Set docProfile = dbAddressBook.GetProfileDocument ( c_sProfileName )
If Not docProfile.HasItem ( c_sProfileItem ) Then ' Run selection Set dcProgram = dbAddressBook.Search (c_sSelect , Nothing, 0) If dcProgram.Count > 0 Then Print "Removing " + Cstr ( dcProgram.Count ) + " Program documents..." iProgram = dcProgram.Count dcProgram.RemoveAll True If c_bNotify Then Print "Sending notification of deletion of " + Cstr (iProgram) + " program documents to " + c_sSendTo + "..." Set docMail = dbAddressBook.CreateDocument docMail.Subject = "PAB - " + sUserName + ": " + Cstr ( iProgram ) + " Program documents deleted" docMail.Send False, c_sSendTo End If ' Notify administrator End If ' There are archive policy documents docProfile.ReplaceItemValue c_sProfileItem, Now() docProfile.Save True, False, True End If ' Have not run before End If ' Address book found Goto EndOfSub ErrorHandle: sErrorMessage = |** Error | + Cstr (Err) + |: "| + Error$ + |" raised at line | + Cstr (Erl) + | when removing Program Documents for | + sUserName If c_bNotify Then Print "Sending notification to " + c_sSendTo + ". " + sErrorMessage Set docMail = dbAddressBook.CreateDocument docMail.Subject = "PAB - " + sUserName + ": " + sErrorMessage docMail.Send False, c_sSendTo Else Print sErrorMessage End If ' Notify administrator Resume EndOfSub EndOfSub:
%REM Mike Hayman - mhayman@bpms.co.uk - 7th April 2004 CODE FOR LOCAL PROGRAM DOCUMENT CLEAR DOWN %END REM