Using due dates can help you keep track of upcoming oroverdue tickets.The biggest problem people face with due dates inSpiceworks: you must be working within the Spiceworksapplication to view these ticket due dates and act uponthem.
The best way would be to somehow import these dates intoOutlook, PHPiCalendar, iCal, etc…
Due dates can be queried from the Spiceworks databaseSpiceworks (since 5.0) locks the entire database frequentlyduring normal operation, so a direct DB query isn‟t viable.We must then make a copy of the spiceworks_prod.db fileto query from instead.
Make a copy of the spiceworks_prod.db database to analternate locationQuery the database copy for any open tickets with duedatesWrite ticket information as calendar events into aniCalendar (*.ICS) fileCopy calendar file to another location to be viewed byadmin staff or used by other applications
iCalendar is a computer file format which allows Internetusers to send meeting requests and tasks to other Internetusers, via email, or sharing files with an extension of .ics.iCalendar is used and supported by a large number ofproducts, including Google Calendar, Apple Calendar(formerly iCal), GoDaddy Online Group Calendar, IBMLotus Notes, Yahoo! Calendar, Evolution (software), eMClient, Lightning extension for Mozilla Thunderbird andSeaMonkey, and partially by Microsoft Outlook and NovellGroupWise. http://en.wikipedia.org/wiki/Icalendar
• Disk space for copy of the Spiceworks database (spiceworks_prod.db)• SQLite3 ODBC Driver (64 or 32-bit, depending on server architecture)• “Sync due dates to ICS” script from Spiceworks Community• Folder for calendar file to be accessed by people who care about due dates(!)• A scheduled task which will copy your database and then run the synchronization script
1. Create two folders, one for the copy of the Spiceworks database, another for the sync script2. Create a batch file which copies the database – this will be used in a scheduled task later.3. Perform a one-time manual copy of spiceworks_prod.db to destination folder so we can create an ODBC connection later (DSN).
On your Spiceworks server, create c:scripts and c:sqlitedbdb…
Create a new batch file to copy your database, we‟ll use it in a scheduled tasklater. Save this file in the c:scripts folder.
Copy your spiceworks_prod.db file to c:sqlitedbdb, this is where we‟ll point ourOBDC Connector (aka “DSN”) later…
• The script queries your offline copy of spiceworks_prod.db for any open tickets from the last 30 days with due dates (configurable).• The script then writes individual calendar entries to a text file called „spiceworks.ics‟ in the same folder where the script resides.• Once all tickets with due dates have processed, the calendar file will be moved to the destination folder.• If the folder is shared, admin staff can import the calendar into their MS Outlook (2007 and above), Thunderbird or iCal clients to view.• Note the calendar is read-only.
1. Download and install SQLite ODBC drivers (respecting CPU architecture)2. Prepare a folder where your calendar (ICS) file will end up (this can be on the same server), i.e. c:scriptsics3. Download and tweak the Synchronization script (tell it where to write the calendar file)4. Create new SQLite3 ODBC Connection (DSN) pointing at our new copy of the offline spiceworks_prod.db file5. Test the script
Download and install the SQLite3 ODBC driver fromhttp://www.ch-werner.de/sqliteodbc/
From the Administrative Tools in the Control Panel, open „DataSources,‟ click the „System DSN‟ tab, then click „Add…‟
Name this DSN „Spiceworks,‟ then under „Database Name,‟browse to the offline copy of spiceworks_prod.db‟ underc:sqlitedbdb, click „OK.‟
Download the sync script from http://goo.gl/lMf0N (SpiceworksScript Center)
When downloaded, the file will save with a „.txt‟ extension.Rename it to „synctickets.vbs‟ in your c:scripts folder.
Open the synctickets.vbs file with a text editor, you‟ll need to edit thevariables „sPathToSpiceworks‟ and „sPublishToPath‟ – any others areoptional.
Open your database copy batch file from c:scripts. Lets add a line to run thenewly downloaded synctickets.vbs script after the database copy is executed(you will want to call it with cscript.exe).Add “Call cscript.exe c:scriptssynctickets.vbs” to your batch file and save.
From Accessories > System Tools, open the Task Scheduler.Note this is called „Scheduled Tasks‟ on Windows XP/2003
Make sure the account you use to run the task has appropriatepermissions to get to the original Spiceworks database and to thefolder where you will write the ICS file.
From the „Triggers‟ tab, set up your schedule to execute oncedaily, repeating every 10 or 30 minutes (your time may differdepending on your needs)
Under the „Actions‟ tab, select your batch file you created earlier.
Right click your new scheduled task and select „Run.‟ Wait aminute or so.Look at the output folder where you told the script to write the ICSfile.
Look in your c:sqlitedbdb folder. You should see a recentlyupdated version of the Spiceworks_prod.db file.
1. From a computer where MS Outlook 2007 or newer is installed, browse to the folder where the calendar file is stored2. Double-click the file, Outlook should recognize it and import it as a calendar3. Added bonus: If you have a relatively modern smartphone synchronizing with your Exchange server (if you have one), the calendar should also show up on your mobile device!
• Not only can you use this database copy to retrieve due dates, but you can query the data for external reporting like Excel, Crystal Reports, MS Access, etc.• You can set up other web services internally that utlize ICS files like PHPiCalendar so non-Spiceworks users can view the calendar through a web browser• As an alternative to using Windows file copy, you could use DeltaCopy, a Windows port of rsync, which is very efficient at copying larger files
Rob Dunn – “Rob Dunn” in the Spiceworks CommunityEmail: firstname.lastname@example.org