variable assignment question

nnCron and nnCron LITE discussion

variable assignment question

Postby alexanjo » Fri, 30 Dec 2005, 09:06

Why does the following command work at the console command line:

S" 100" S>NUM VALUE first_var

but not in nncron.tab:

#( test
NoActive
Action:

S" 100" S>NUM VALUE first_var
)#

where the following error is produced:

test: Crontab syntax ERROR!!!

Jordan
alexanjo
 
Posts: 19
Joined: Tue, 22 Nov 2005, 01:57

Postby VK » Fri, 30 Dec 2005, 12:25

This is just because you are trying to declare the VALUE-variable inside the Action:. This forces an error while compiling the task (do you see the difference between compile-time and run-time?). Try to declare the variable in the beginning of the task (before the Action:) and assign a value inside the Action:.

More info:

http://www.nncron.ru/help/EN/working/variables.htm
http://www.nncron.ru/help/EN/working/tools_console.htm

HTH!
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

thank you VK--your pedagocical help is greatly appreciated!

Postby alexanjo » Fri, 30 Dec 2005, 21:04

Sincerely,

Jordan
alexanjo
 
Posts: 19
Joined: Tue, 22 Nov 2005, 01:57


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest