Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


ErikC
  •  ErikC
  • Paid support Topic Starter
2012-08-13T09:16:12Z
Hi,

I have some .NET functions written with the .NET task.
I cloned a lot of these functions in other jobs, but when I need to change a function I need to do this in all my tasks.

What about putting the .NET functions in a global place, like notifications. You can manage them in one place and select them using the .NET task.

Regards,
Erik
Uses Visualcron since 2006.
Sponsor
Forum information
bbusse
2012-09-04T18:35:57Z
Originally Posted by: ErikC 

Hi,

I have some .NET functions written with the .NET task.
I cloned a lot of these functions in other jobs, but when I need to change a function I need to do this in all my tasks.

What about putting the .NET functions in a global place, like notifications. You can manage them in one place and select them using the .NET task.

Regards,
Erik



I think you stated this perfectly. I was just looking, and I saw another similar post, regarding a way to possibly add a custom task that is something I could select for several jobs. In a sense this is kinda what you're asking, at least in part.

In my case, as the other person suggested i'd like to be able to create my own Task type that I can select. It would merely run 'Direct.exe' to submit NDM jobs and the only variables I need to pass it are the CDP file Name and possibly the credentials if different from default.
For instance, We use Sterling Commerce (now owned by IBM) Connect:Direct / NDM, and I would love to have an option right in the Task list for 'Submit NDM' that only requires 2 variables. The CDP file to use (code for NDM to know what servers to talk to, source file, destination file, etc..) and then the credentials to use for it. I just didn't want to end up creating a new execute task (or .NET or Powershell script) for each one as I love when I can accomplish my tasks without any .bat, .ps1, etc... files being placed on the system. Keeping all the code within VC is ideal which is why I'd love to just add a custom task that is reusable and accepts/requires variables...

I'll likely edit this to clean it up when I re-read it, just thought i'd toss this out there that a reusable bit of code would be ideal, as long as that reusable bit of code can have unique parameters passed to it per task.

ErikC
  •  ErikC
  • Paid support Topic Starter
2012-09-06T05:59:34Z
bbusse wrote:

.... as long as that reusable bit of code can have unique parameters passed to it per task.


With the .NET functions there are no variables hard coded in the task. They are variables which can be filled using the .NET functions.

When you want a cusom task, It could work like this:

You have created a task which you would like to re-use.
Right click on the task and select 'Create Task Template'.
It allows you to fill in a cutom task name.
All variables used in the task are automaticly replaced by [variable].
Now, in your task list, there is a custom task section where you can find this task.
Selecting a template task gives you all the settings back.

Now I'm thinking of how to modify this custom tasks.. when using a screen like the notifications (global stuff) this should be possible.

But, I want the .NET functions globilized (is this a word?) ;-)

Regards,
Erik
Uses Visualcron since 2006.
ErikC
  •  ErikC
  • Paid support Topic Starter
2015-03-13T12:12:15Z
Hi all,

Just wat to give this request some more attention:

In the current version (7.6.1) the assembly task is different than in version 6. In version 6 the methods in the assembly were 'merged' into the Visualcron's memory when starting the service. This made execution fast, but there was a downside. When you wanted to change the code inside the assembly, Visualcron had to be restarted to see this changes.
The current version will look every time to the actual dll and sets up an environment to start the method within the dll. This takes more time to do, but you can change your dll any time and Visualcron pickes it up instantly.

For me the extra time to handle the assembly task is a pain. The task is in a loop and it runs 100+ times. The total time of my job went from a few minutes to more than an hour. So I went back to the .NET task to get my speed back.

The reason for using the assembly task for me was to have global .NET functions I could use. I use the same code in more jobs, so when I made a modification to the assembly, all my tasks used the code are up 2 date. Now when I'm not using the assembly task anymore this request is back in place.

---
I want to have a way to make my .NET methods global, so I can select a .NET method in a task which I created somewhere else in the application. Just like connections or notifications. When selecting a .net method, you have to fill in the parameters if needed. If I change the code, it should be changed in all tasks.
You have to alert the user if the method is used in other tasks and that the parameters could be cleared. There has to be some thought how to do this.

So lets talk about this, what do you all think?

Regards,
Erik

Uses Visualcron since 2006.
thomas
2015-03-13T13:31:44Z
Hi

I agree with this request. In the meantime, is this a workaround that would suit your needs? Create .Net jobs where you define the parameters as job variables. Then you call these jobs whenever needed, where you supply the relevant parameters. Like in the attached file.
File Attachment(s):
Doc1.doc (225kb) downloaded 64 time(s).
ErikC
  •  ErikC
  • Paid support Topic Starter
2015-03-16T09:11:10Z
Hi Thomas,

Thanks for your suggestion. That would definitely work, but it has the same outcome: The time issue.

Everytime the assembly task starts, there will be setup an environment by VC to securly load the assembly. This takes a few seconds everytime the task runs.
For me this is a pain, because this task is in a loop which runs 100+ in one job run. The total running time is to high.
With a .NET task this is not the case and the task will run only a tenth of a second.

So a tenth of a second VS a few seconds times 100+

Regards,
Erik
Uses Visualcron since 2006.
Support
2015-03-19T07:57:58Z
So, how is this different from using a .NET code Task as Notification?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
  •  ErikC
  • Paid support Topic Starter
2015-03-19T10:43:39Z
Hi,

I's like the Notification indeed. They are global also.

Here some custom images I created to make it more clear:
Manage _NET Functions.png _NET function execute Task.png Add Update _NET function.png

regards
Erik
Uses Visualcron since 2006.
ErikC
  •  ErikC
  • Paid support Topic Starter
2015-03-20T08:49:56Z
Hi,

In an email to support I received an other idea what I want to share: Use .NET Functions as variables.
Now we have a lot of functions, e.x. STING, PATH, REGEX, DATE ...
Adding the .NET Functions here could also work.

{NET(functionname|parameter1|parameter2|etc)}

Unique function names
I think for a start keep it easy: Functionnames must be unique, so you do not have to worry about function overloading.

.NET Language
Both the languages VB.NET and C# should be supported for this.

Implementation
This should be like the user defined variables, but wit the GUI of the .NET task

When I compare my 1st implementation with a seperate .NET function section with this implementation I believe this is better.
It's earies to implement I think and has a better place in VC itself.

Hope to get some more people on board here 😛

Regards,
Erik
Uses Visualcron since 2006.
Support
2020-04-24T07:21:34Z
This has been implemented some versions ago.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top