AutoMate Backup
This task will create a backup of AutoMate and all of its task files. What this script does is creates two different backups each time it is run. The first backup is performed using the AutoMate backup step. The second part is to backup all of the AutoMate task files, scripts, modules, etc. that are stored in the AutoMate tasks directory into a zip file. The script assumes the following:
1. Backups are stored in the directory {TasksDir}\Backups.
2. Backups created using the AutoMate step are stored in {TasksDir}\Backups\App.
3. Backups of the AutoMate tasks files, modules, etc. are stored in {TasksDir}\Backups\User.
4. All backup files are named with the current month, day, hour, and minute that the file was created.
5. Backups are kept for a total of 60 days and then are deleted if older than that.
Each of the above assumptions are controlled by variables that you can change at will. If you want to change the number of days that the backup files are created, change the variable DaysToKeep.
You can setup a schedule trigger for this task and have it run every day to create backups of your entire AutoMate settings, task files, and any user files that you may place in the AutoMate tasks directory.
| Download This Task (2.2kb) AutoMate Backup.aml |
Would you like to upload a Sample Task to the User Resource Center? Click here!
|
More Sample Tasks
|
Using the split function to parse a text file
The sample program writes out a table text file to be used as input. Normally this would be created using a text editor such as Wordpad or Textpad. Excel could be used for table-driven processing as well. Excel is more powerful and versatile while text is faster and uses less memory. The text file of parameters is read in and separated by the character '#'. In the example it just displays the table parameters as they are read, but in general the parameters would be used to perform some table-driven process. Each line is split into three words using the Split() function and puts each word into a separate variable. |
Executing a DOS command and saving the output
This example executes the DOS 'dir' command on the C: drive and puts output into a text file for further processing. It is based on the blog "Executing Command-line Applications Using The Run Action". The C:\ drive in this example could be substituted with any mapped drive or folder. The 'dir' command has many options to obtain a variety of directory/file information. Any DOS command can be substituted for the 'dir' command in this example to capture the output of the command in a file. |
Creating a Radio Button List from an Array
A radio button list is an example of how to display a menu of options. One way to populate the list is by using an array. This is a simple example of creating the menu with an array of values. After the prompt, the program displays the selection. |
Sample Workflow: Memory, Disk Space Monitoring
This sample workflow for Business Process Automation (BPA) will demonstrate how to solve a computer and/or server problem by adding resolution automation management, system gathering and reporting for troubleshooting and speedy recovery. |
Update Your Tweets with AutoMate
Are you diehard twitter-er? If you are one of them, you most likely tweet using one of the many different ways to post updates: from the web in the update box, from your phone, from your mobile web browser, or from a third party application. This sample task allows you to tweet at the comfort of your computer without logging on to your personal or business twitter account. In fact, use a hot key trigger (e.g., Alt + A) to open a dialog box, enter your tweet, and press Enter. |
Get @Mentions Tweets and Populate to Excel
A mention is any Twitter update that contains @username anywhere in the body of the Tweet. This means that replies are also considered mentions. Twitter collects these messages, as well as all replies, and stores them in the @Mentions tab on your twitter homepage. This sample task connects to your personal or company twitter account, reads all tweets in the @Mentions tab, populates them in an Excel spreadsheet by Date Created, Twitter Message, and Twitter User, and sends an email notification with an Excel attachment. This task allows you to automate the monitoring of all activities related to your twitter account on a regular basis without having to logon to Twitter or manually parse through large volumes of data. |
Create a dynamic selection list of month and years
It can be handy sometimes to give the user a selection list of month and year, for example to generate a report for that certain period. This task generates the list and considering the current month it adds a year for months that have passed already. So when you run this in March 2012 it will show January 2013 Februari 2013 March 2012 April 2012 etc The selection shows next month as default. Edward Hulleman, Aug 4 2011 |
Create/Send Encrypted AS2 Message
AS2 (Applicability Statement 2) is a standard that defines security requirements for sending and receiving EDI over the internet (EDIINT) using certificates and encryption. This sample task demonstrates how AutoMate creates an AS2 message containing an XML file attachment called book.xml, encrypts the message using a certificate native to AS2 and digitally signs the message using a certificate and key. The AS2 message is then transmitted over the internet (EDIINT). |
WMI Trigger for Notepad Process
Use of WMI has become an essential way to facilitate system and network administration. This sample task demonstrates how to use the WMI Trigger to identify if Notepad is running. If true, the user will be asked if they want the notepad.exe process closed. |
Send Email To SMS
This sample task will demonstrate how AutoMate can use the Send Email action to send a short email and have it delivered to a mobile phone as SMS. Most mobile carriers offer free Email To SMS gateways which can be used to forward simple text emails to a mobile phone. And the good news, the majority of those gateways are free and available to the general public. Carriers included in this sample task: AT&T Sprint T-Mobile Verizon The task can be updated to include any mobile carrier that offers Email To SMS gateways. |
-
6/5/06 by Adam KoseckiThank you for your contribution! I have one question, instead of looping through the directory, using an IF statement, and deleting the files that meet your date time criteria, why not use a single "Delete File" step using the "Only if older than" option?
<AMFILEDELETE SOURCE="%BackupFileList%" ISOLDERTHAN="%DateAdd( "d", -1, CStr( Now() ))%"> -
6/5/06 by Jeremy Landesjlandes ~at~ landeserve ~dot~ comAdam, That is indeed one way of doing that. However, I prefer to do it this way, as I have full control over what happens and I can perform additional steps on each file, if it is necessary. Thanks.
-
6/5/06 by Jeremy Landesjlandes ~at~ landeserve ~dot~ comIf you'd like to change this task to use Adam's suggestion, you can change the last few lines where I'm looping through the files in the AppBackupDir and UserBackupDir to the following code:
<AMFILEDELETE SOURCE="%AppBackupDir%\*.ama" ISOLDERTHAN="%DateAdd("d", DaysToKeep, Now())%"><br /><br /> <AMFILEDELETE SOURCE="%UserBackupDir%\*.zip" ISOLDERTHAN="%DateAdd("d", DaysToKeep, Now())%"> -
6/5/06 by Jeremy Landesjlandes ~at~ landeserve ~dot~ comCorrection, use this instead. You can also get rid of the variable BackupFileList, as it would no longer be needed using this method:
<AMFILEDELETE SOURCE="%AppBackupDir%\*.ama" ISOLDERTHAN="%DateAdd("d", -DaysToKeep, Now())%"><br /><br /> <AMFILEDELETE SOURCE="%UserBackupDir%\*.zip" ISOLDERTHAN="%DateAdd("d", -DaysToKeep, Now())%"> -
7/17/06 by Bart Van LagenThis is a very usable task.
-
7/15/08 by Unknown UserI cannot figure out how to change the default locations of the variables....can you please give me some help? I would like to backup to a remote server instead of my C: drive
-
7/21/08 by Leonard AmabileHi Debbie, Steps 1-8 in the task are the variable settings. You can edit any one of their values to reflect another location such as c:\temp. -Leonard
Comments (7)