welcome to 's blog...


公告

我的分类(专题)

日志更新

最新评论

留言板

链接

搜索


Blog信息




Lotus program document
aku1 发表于 2006-6-13 10:14:16

说实话,这里不是很清楚,帮助也没清楚说明,只好摘点:

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.4 Linux - RedHat


3 RE: R5 - Program Documents
Colin Fenton 16.Sep.05 12:29 a Web browser
Domino Administrator -- Other 5.0.5 Windows 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

问题

管理员需要定时运行服务器命令,以便在服务器的日志中收集有关的信息。是否可能在一个固定的时间运行如"DBCACHE FLUSH"这样的服务器命令?

解答

答案是可以的, 管理员需要在服务器的公共通讯录中创建一条程序文档,具体方法如下:

1. 打开公共通讯录(Names.nsf),然后选择服务器, 程序
2. 选择添加程序
3. 在基本的标签上,输入以下的信息:

程序名: nserver
命令行: -c "DBCACHE FLUSH"
运行的服务器: 程序运行所在的服务器

4. 在安排标签上,输入以下内容:
启用/禁用:启用
运行时间: 指定需要的时间安排
重复间隔: 需要运行一次输入0, 否则输入需要的时间间隔
每周复制日期:选定需要运行的日期

* 服务器命令的例子:sh server, sh task, sh shedule, dbcache flush, tell amgr q, tell sched q

以上的程序文档会向服务器控制台发出指定命令, 同时会在服务器控制台以及日志数据库(log.nsf)中记录相关的日志。

 

无意中看到一段lotus

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

%END REM
Const c_bNotify = True
Const c_bRunForAllUsers = False
Const c_sSelect = { Type ="Program" & Form = "Program" & Program = "Compact" & Schedule=[12:00:00] & WeekDays = "3" }
Const c_sSendTo = "Administrators"
Const c_sProfileName = "DatabaseProfile"
Const c_sProfileItem = "ProgramRemovedDate"

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




阅读全文 | 回复(0) | 引用通告 | 编辑


发表评论:

    昵称:
    密码: (游客无须输入密码)
    主页:
    标题:



Powered by Oblog.