![]() |
This type of automation is one that Newsbin users have been requesting for some time. The need for such facilities has become more urgent as many ISP's (mine included) are starting to introduce monthly download caps. Some of them allow unrestricted downloads at certain times of day but apply download caps at other times. NBSchedule allows you to set up Newsbin to work well within such constraints.
The prime purpose of NBSchedule is to enable you to cause pre-defined actions to happen within Newsbin at specific times. You can set actions to occur once at a specified time, or to repeat at user defined intervals. In normal use, NBSchedule runs in the background and only manifests itself as an icon in the Windows System Tray in the area next to the clock, so it is very unobtrusive. NBSchedule will (optionally) write a log of what it has carried out on your behalf if you want to be able to find out what it has done on your behalf.
Options currently supported are:
The following files will be created while NBSchedule is running:
NBSchedule.cfg
. This
holds all your configuration information. Note that although this
is a text file and can be viewed with any suitable editor (such
as Notepad) it should not be altered except via the NBSchedule
configuration screens. To follow the XP Compatibility guidelines,
if NBSchedule has been installed under the default location within the "Programs Files"
area, then this file will be located in a NBSchedule sub-folder of
"My Documents" for the current user. In all other cases it will be
located in the same folder that was chosen to install NBSchedule.
NBSchedule.log
, while
if you specify a different file for each day then it will instead
be of the form NBSchedule_YYYYMMDD.log
. The default
location for log files is at the same location as the NBSchedule configuration
file as described above, although you can change this via the Configuration dialogs.
Note that NBSchedule does not delete old logs, so you might want to periodically go to the logging directory and delete any old logs that are no longer needed.
If you want to remove the NBSchedule program from your system, then the best way is to do it via the Add/Remove Programs option within the Control Panel. However if you want to be lazy then as NBSchedule software make no use of the Windows registry to store information, you can also get away with simply deleting the NBSchedule program and its associated files.
This screen shows the current list of tasks that have been configured, giving details of when they are next scheduled to run (if ever); when they were last run; and the result of the last run. When NBSchedule is first launched there will be no tasks defined, so the main dialog will look as shown above.
A more complex example with some tasks defined might look like the following:
This case is set up to allow for the a case where the ISP applies download caps between 10:00-15:00 and then from 16:00-21:00. During those periods Newsbin has been set to be paused, and is also hidden from view. There are also 2 tasks defined that are set as inactive so will not be run automatically. It also illustrates that the size of the main window can be changed to show a bit more information, and this change is then remembered as the default for future runs of NBSchedule.
By default the tasks are in the order they will next be run, but you can click on any of the column headers to define the sort column. Clicking the same header again reverses the sort. The current sort order will be remembered across a NBSchedule closedown and restart.
Note that if you untick the task in the main screen then its details will be remembered but it will no longer be automatically run.
The buttons on the main screen are:
If you right-click this Clock icon then a small menu of options available. Any options that are not currently relevant will be greyed out:
The Restore option gets the main NBSchedule screen back and restores it to visibility on the Windows Task bar. For convenience a double-click on the NBSchedule Clock icon will also act as a restore.
Most of the options on the Configuration screens have accompanying Tooltip texts that are popped up if you place your mouse over the label for option. The Tooltips give a more detailed explanation of the prupoes of the configuration option.
Note that you can switch between two different methods of showing the list of options. I would be interested in feedback of which style users prefer.
This option is used to get NBSchedule to launch Newsbin if it is not already running when NBSchedule is started. This option will be disabled if you have not set up the path to the Newsbin binary.
Note that it is also possible to get NBSchedule to start Newsbin at a specified time by creating a "Start Newsbin" task.
NBPro.exe
).
This is needed if you want NBSchedule to be able to start Newsbin.
This option will be disabled if you have not yet specified that Newsbin
This option is used to get NBSchedule to hide Newsbin when the NBSchedule program is started. Note that it is also possible to get NBScedule to hide (or show) Newsbin at a specified time by setting up specific tasks for this.
This option is used to get NBSchedule to put Newsbin into the state it would have been if NBSchedule had been running continuously. The states affected are the PAUSE, LIMIT and Hide/Show states. This option is of particular use if you are also using NBSchedule to auto-run Newsbin as you do not then have to remember to set these states manually at startup.
If this option is set the NBSchedule will put itself directly into the Systray when it is launched.
This option is used to get NBSchedule to close Newsbin when the NBSchedule program is closed. If not set then Newsbin will simply be un-hidden (if required) when NBSchedule is closed and left running.
This option is used to get NBSchedule to close itself when the Newsbin program is closed.
This option is used to get NBSchedule to power off the PC when the Newsbin program is closed. You can either set Newsbin to be closed via a timed task or you can set the option in Newsbin itself to close when the Download list becomes empty (under Options->Advanced). Note however that if you set this option in Newsbin it will exit when the Download list empties even if there if repair/deciding activity outstanding in the AutoPAr tab.
CAUTION: use this option with care as NBSchedule only checks if Newsbin is not running. It does not check that any other applications have been closed down tidely. It is intended for cases where you leave Newsbin running (typically overnight), and when Newsbin finishes you want the PC to be power off to save electricity.
To try and help provide a small element of safety when NBSchedule decides that a Power Off is due, it provides a countdown dialog of the form:
If the countdown reaches zero then the Power Off is initiated. By clicking on the relevant buttons the user can also elect to abort the Power Off, or to perform it immediately without waiting for the countdown to complete .
This is a compulspry delay that is imposed after Newsbin has exitied before the AutoClose nNBSchedule or AutoPower Off is executed.. It is set to a minimum value of 5 minutes. The intention is to allow the user time to react if he notices that a closedown is about to be executed and he would rather that it was not. The value specified is the initial time in the countdown dialog mentioned above.
At the moment these are not changeable by the user, so this is really just used for information purposes.
The IP address is the one that is used to run the Newsbin TCP/IP
Command interface. It is important that you are not blocking this
address with any firewall software.
The address of 127.0.0.1
is also commonly called localhost
The Port is the one that Newsbin is listening on for commands.
If you want to try driving the interface manually you can try connecting
by typing the command:
TELNET 127.0.0.1 118
at the Start Menu->Run option in Windows.
The Test
button can be used to check that NBSchedule
can communicate correctly with Newsbin (assuming it is running).
If the test fails either you are running a version of Newsbin that
does not support the TCP/IP interface, or you have some third
party software (such as a firewall) blocking communication with Newsbin.
This allows you to specify which version of Newsbin you are setting NBSchedule up to run in conjunction with. The main purpose of this option is to control the options that you are offered as being valid when defining tasks to run at specified times.
This is the password (if any) that has to be specified before NBSchedule can be put into locked mode.
This is the passord (if any) that has to be specified before NBSchedule can either be restored to full screen mode if running from the System tray, or the Options screen invoked.
This allows a password that has to be specified before NBSchedule will allow the Newsbin program to be hidden.
This allows for a password that has to be specified before Newsbin will be unhidden if it has been hidden by NBSchedule.
NBSchedule.log
.
NBSchedule_YYYYMMDD.log
This allows you to specify your own directory for storing any NBSchedule log files. If not set, then they are stored in the users data directory.
This allows to control the amount of detail that is logged.
The diagnostic and entry/exit log levels can create LOTS of output, and are really only intended to help with debugging any potential problems that are encountered with NBSchedule. It is unlikely that the output at these two levels will mean much without access to the source code so you are advised not to use them unless collecting evidence for a fault report.
If you highlight a task in the main Window and select Edit then the Task Settigns dialog will be presented, but this time with any existing values pre-filled.
The Task Settings dialog for defining a task looks like the following:
Any fields that are not currently relevant will be greyed out (or hidden).
The meaning of the various settings are:
Some task types take a parameter such as a group name or filename. If this is required an additional field will appear under the task type to enable the required information to be specified.
The Range options allow to put a limit on the number of times that any repeat options should be carried out.
Facility | Newsbin 5.0 (or later) |
Newsbin 4.3B6/8 | Other versions |
---|---|---|---|
Minimize to Systray | x | x | x |
Start Newsbin | x | x | x |
Close Newsbin | x | x | |
Hide/Show Newsbin | x | x | x |
Bandwidth Limiter ON/OFF | x | x | |
Pause File Download ON/OFF | x | x | |
Update Enabled Group Headers | x | ||
Update a Specified Group's Headers | x | ||
Start Header Download | x | ||
Stop Header Download | x | ||
Compress Stored Headers | x | ||
Clear Post List | x | x | |
Load File |
x |
x |
|
Copy Folder | x |
For more details of the TCP/IP command syntax supported by Newsbin please refer to the Newsbin TCP Interface Reference documentation
Facilities that do not use TCP/IP Interface features are described in more detail below:
Logging=true | Enable diagnostic logging. Takes precedence over any configuration file settings | |
LogFile=filename | Set the log file name. This will take precedence over any configuration file settings | |
LogClass=class1,class2 | Only log the class names supplied. You will only know what are valid class names to you use with this option if you either have access to the source, or have been advised what value to use by someone who has access to the source. | |
LogExcludeClass=class1,class2 | Exclude the class names supplied from logging. Excludes take precedence over includes | |
LogExcludeEntryExit=true | Excludes logging of function entry / exit points |
The "Diagnostic" level is aimed at really detailed trouble-shooting and may not mean much to the average user. This level generates significant amount of loffing as entries are written even when NBSchedule is idling waiting to execute a task.
The highest level of Entry/Exit logging should only be used if you are requested to run it as much of the output does not mean much unless you have the NBSchedule source code to compare it against.
If NBSchedule will not start for any reason then try running the following command from
a DOS Command Window:
"C:\Program Files\NBSchedule\NBSchedule.exe" Logging=true LogFile=C:\NBSchedule.log
(If you did not install to the default location then modify the path to the NBSchedule.exe file appropriately)
This should create the file NBSchedule.log
on the C: drive.
You can send this file to the author using the email address in the
Author and Copyright section below
so that an attempt can be made to diagnose why NBSchedule failed to start.
It is a text file so zipping it up first should make it much smaller for sending.
Having all levels of logging permanently available has the advantage that there is no need to issue a special version of NBSchedule in the (rare) cases that such a log is requested to investigate a problem.
This library and associated documentation has been produced by:
Dave Walker
22 Kimptons Mead
Potters Bar,
Herts,
EN6 3HZ
United Kingdom
Web: http://www.itimpi.com
Email:nbschedule@itimpi.freeserve.co.uk
Every effort has been made to ensure that the software operates correctly as specified in this document. However no guarantee of any kind is given that the software is reliable or that the descriptions contained in this document is accurate. It is up to the user of the software to satisfy himself that it is suitable for the use to which it will be put.