Command Line Keys for nncron.exe and tm.exe



Install nnCron service (WinNT/2000/XP)
-remove Remove nnCron service (WinNT/2000/XP)

Do not display confirmation message box after installing/removing the service (this key should be placed before "-install/-remove") (WinNT/2000/XP)
-ns Launch nnCron as a regular application (not as a service)
-debug Run nnCron in debug mode (some additional information will be written to nncron.out file)
-v Display nnCron version and build number
-ep your_password

Generate an encrypted password.

As the task source text is stored without any protection in a plain-text crontab file, nnCron provides an option to use your password in tasks in what I call "sort-of-protected" encrypted form.
To generate this type of a password, start nncron.exe in command line followed with parameters "-ep <your password>". After that, the program will display a message box with your password in encrypted form. It should be used in SecPassword: constructions. I'm calling this type of passwords "sort-of-protected" because the encryption algorithm is a very simple one and can be rather easily cracked by an expert. WinNT/2000/XP, though, allows to control access rights to individual files and directories, so if you wish you can protect crontab files from outsiders (just be sure to grant access to these files to those users whose user names are used with "run as user" option). See also Authorization section

-stop Stop nnCron (handy for Win95/98 users)
-reload Immediately reload modified crontab
-run task-name

Run the task specified in argument. More detailed discussion of this key can be found here.

-runfile <filename>

Execute the specified file as a script; the file should contain Forth word main. A more detailed description of this key can be found here.

-wp Do not load the plugins when nnCron starts. Use this key in conjunction with -runfile option if you want nnCron to start faster.
-hi Hide the nnCron icon in system tray
-si Display the nnCron icon in system tray
-ini <filename> Specifies the file containing nnCron settings (nncron.ini by default)
-out <filename> Specifies the file which will receive the technical information output (nncron.out by default)
-? Show nnCron Help (see also Help Menu Item).


tm.exe is the nnCron's GUI. This is the dialog which appears when you doubleclick on the nnCron's icon in system tray. This dialog permits to set and change nnCron's basic parameters as well as add/edit tasks in crontab files. Here is the list of command line parameters used by tm.exe:

tm.exe Running tm.exe without additional parameters will result in displaying a dialog box for adding a task into the default crontab file
tm.exe About Display About the Program dialog box
tm.exe Console <host> <port> Start Remote Console and attempt to connect the specified address using the specified port
tm.exe EditTask "crontab filename" task_name Display Edit Task dialog box which allows you to edit the specified task
tm.exe Hint [some text] Display a small "hint" message (looking somewhat like Windows tooltips) with the specified text
tm.exe Message [first line\second line...] Display a message box with the specified text
tm.exe NewReminder "crontab filename" [first line\second line...] Display New Reminder dialog box which allows you to add the specified text to the specified crontab file
tm.exe NewTask ["crontab filename"] Display New Task dialog box which allows you to add a new task to the specified crontab file
tm.exe Options Display Options dialog box
tm.exe Reminder "crontab filename" once|* [first line\second line...] Display a Reminder box containing the specified text and allowing you to set the repetition options.
tm.exe TimeHint seconds [some text] Display a small "hint" message (looking somewhat like Windows tooltips) with the specified text, which will disappear after the specified period of time
tm.exe WinSpy Start WinSpy utility

Executing Forth Words in Command Line (Oneliners)

Beside possessing standard capabilities for working with for command line keys, nnCron also provides its users an interesting capability to define and execute Forth words right in command line. This is similar to so-called oneliners used in Perl.

Oneliner is a line of program code that can be executed in command line.

The rules are as follows:


Displaying a message box with test message:

nncron.exe S" test message" MsgBox BYE

Now we'll create a file, write into it the current user's user name, display the text from the file in a message box and, to complete the task, make our computer to emit a touching beep. Of course, all this is just one long command line:

 nncron.exe S" oneliner.txt" FCREATE S" %USERNAME%" EVAL-SUBST S" oneliner.txt" FAPPEND S" oneliner.txt" FILE 3 TimeMsgBox 250 500 BEEP BYE

Now a more interesting example. In a single long command line we shall create and execute a new word which will inform us whether we are online:

nncron.exe : test_online ONLINE? IF S" we are online!" 3 TimeMsgBox ELSE S" we are offline!" 3 TimeMsgBox THEN ; test_online BYE

Please also keep in mind that you can include in onliners entire pieces of code from external files (S" filename" INCLUDED).

Oneliners can also be used in *.cmd and *.bat files for checking for various conditions. nnCron will return errorlevel 0 if the condition is FALSE, and -1 if it is TRUE.


Checking if we are connected to the Internet:

start /wait nncron.exe ONLINE? HALT

An example of using a prefix word:

start /wait nncron.exe : online? ONLINE: "ISP" ; online? HALT