I'm doing an a email marketing app for an ecommerce site for the first time using node.js amd I'm a newb. I fully expect the dev team to change a lot of the default times and add new email types in the imediate future.
Hence the title question....
I structured it as follows:
Multiple email scripts that are designed to be run by either cron or task scheduler: So one script for running every 5 minutes, 10 minutes, 1 day, etc. Within each script is the code for the emails to be sent out after query to the user database finds a match within its time frame. Developer can add new time interval scripts and/or put multiple types of emails in any script.
I made a powershell and bash script for installing the node js dependencies and linking them so all the developer has to do is:
go to cron/task scheduler; configure it to run any email scripts at scheduled time.
I presented the first draft to the developer and he wondered why it wasn't configured as a package. What would be the benefits of configuring it as a package versus giving them a collection of scripts in a tar file?
Simplicity of setup is probably part of it. This kind of sounds like a good candidate for node-webkit which will allow you to create an easily distributed all-in-one application for OSX, Windows, and Linux. It would include node itself, a browser based interface, your servers, scripts, and anything you can come up with.
This approach would also give you a GUI where the configuration details can be configured from a simple form and whatever else you can imagine and develop out. For building releases for each platform, I would recommend checking out grunt-node-webkit-builder.