## Command Parameters in nnCron Lite

nnCron and nnCron LITE discussion

### Command Parameters in nnCron Lite

Hi,

Does the syntax for nnCron Lite (<time_in_cron_format> <command>) allow for command parameters in <command> ?

This is what I want to do:

I want to schedule CCleaner to run every hour, on the hour, and I also want to specify the command-line parameter /AUTO, so CCleaner will launch, clean, and automatically close.

This is the line of code I've tried, but it doesn't work:

0 * * * * c:\program files\ccleaner\ccleaner.exe /AUTO

The following code does work, and it simply launches the program:

0 * * * * c:\program files\ccleaner\ccleaner.exe

So, my question is this: How are command-line parameters entered into the syntax for nnCron Lite, in cron.tab?

pnorcks
pnorcks

Posts: 2
Joined: Sat, 28 Oct 2006, 22:30

Try this:

0 * * * * "c:\program files\ccleaner\ccleaner.exe /AUTO"

Does this solves the problem?
CU
VK

Valery_Kondakoff

Posts: 769
Joined: Thu, 01 Jul 2004, 20:49
Location: Moscow, Russia

Hi Valery,

That didn't solve the problem.

But I did read through the forum again, and I found a solution.

The following line of code works for me if I start nnCron Lite as a regular application instead of a system service (I'm running XP SP2):

0 * * * * c:\program files\ccleaner\ccleaner.exe /auto

I also changed the variable AsLoggedUser to OFF, since the help file instructs to do this when starting nnCron Lite as a regular application, but I don't know if that was necessary.

I want to thank you for writing this great piece of software. nnCron Lite will now be my full-time scheduled-app launcher. Thanks again!

pnorcks
pnorcks

Posts: 2
Joined: Sat, 28 Oct 2006, 22:30