febooti softwarehome of febooti softwarefebooti software

scheduling automatic email sending of a list of processes

Email integration
homenewsproductsdownloadsorderingsupportcontacts
show Quick Links
hide Quick LinksQuick Links: Command line email home | Online help | Commands | Batch files | FAQ | Buy now | Download


A process is an application in execution. Each application on a Windows based computer has its own processes. All applications with a graphical user interface (GUI) will have a running process. However not all processes will necessarily have a corresponding GUI. Some processes are used for background tasks, which do not require user interaction such as virus checking or automatic backups. Using the Windows Task Manager it is possible to view the list of running applications and processes on the local PC.

It may be useful to be able to save a list of running processes in a text format and automatically email them to a specific destination. One possible use of this could be to schedule this task so that processes can be monitored on a PC to check for any rogue processes or possible viruses. Another use could be for a network administrator to ensure that a particular process is running on a server, and if not to rerun that process or reboot the server.

The following example demonstrates how to create a batch file that will make a text file, which contains a list of running processes at a given time period. The batch file will be scheduled so that it runs every 10 minutes.

Solution:
A batch file should be created as per the example below.
A new task should be added using the Windows task scheduler that runs the above batch file every 10 minutes. In Windows XP the task scheduler can be accessed from Start | Programs | Accessories | System Tools and by clicking on the Scheduled Tasks menu item. A new task can be added by selecting New | Scheduled Task from the File menu. Once the task has been created, the batch file and actual schedule can be defined by right-clicking on the task and selecting Properties.
@echo off

rem Gather a list of application(s)
rem and associated task(s) / process(es)
rem currently running on either a local or remote system...

tasklist > proclist.txt

rem Sending email with process list attached...
febootimail -SERVER outgoing.mail.server.com -FROM process@machine.com -TO process-viewer@admin.com -SUBJECT List of requested processes -ATTACH proclist.txt

rem Cleaning temporary files...
del proclist.txt >NUL
Type text Copy text


1: The first command retrieves a list of running processes in a table format. The output of the command is piped to the proclist.txt file. It is possible to change the formatting of the tasklist command using command parameters and filters.

2: The second line makes the call to febooti Command line emailer.

3: -SERVER is the name of the outgoing mail server as an IP address or a standard URL.

4: -FROM specifies who is sending the email.

5: -TO is the recipient of the email. The recipient may also include friendly names which must be enclosed in double quotes.

6: -SUBJECT defines the subject of the outgoing email.

7: -ATTACH tells the auto mailer to attach the list of processes stored in text file by a batch script.


Previous email integrationEmail integration 9 of 9
Return to Origin
Next email integration



Look closer
febooti Command line email client: send mail from Windows command line (MS-DOS prompt)
febooti ieZoom toolbar - zoom IE web site pages
febooti fileTweak - change file date, time and attributes


How to?
How to send email automatically (schedule auto e-mail tasks)
Utility Command line email attachments
How to send e-mail from command line instead of MAPI


Links
febooti software affiliate program
Link to us!
Links


febooti softwarehome of febooti software
back to top
Copyright © 2001-2006 febooti software. All rights reserved.
Copyright © 2001-2007 febooti software. All rights reserved. Last Updated: February 28, 2006