tags:

views:

344

answers:

3

Has anyone run an exe using cron job?

I want to run an exe at scheduled intervals on a cloud server. The scheduled exe is created using .NET.

The cloud server has facility of running Cron jobs using ruby, php, perl, python and http I do not have much knowledge of what a cron job is.

What would be the best way of scheduling the EXE? It is important that the adopted method is secure and not accessible to everyone.

Many Thanks!

A: 

cron is a Unix daemon that runs shell commands according to a configured schedule (the crontab). Your cloud server provider must have something similar they call cron that runs "ruby, php, perl, python and http" jobs. You'd need to consult their documentation to understand how that works.

I'm not sure what kind of security you're looking for. A traditional cron job is equivalent to logging in and executing the command. If that's "secure", then the cron job is "secure".

Jeremy Stein
Regarding security:I was thinking of calling ASP.NET page using HTTP, which is supported by the cloud provider. But then this page will be available for anyone to call. I was thinking about possible ways to prevent that happening. one of the ways could be - allow requests from only a fixed IP. But since I do not know enough about cloud, I am not sure whether this will work. Will try anyway. Thanks!
Puneet
The simplest way would be to call `https:``//username@password:www.mysite.com/mypath/` That will use Basic authentication with "username". However, this feels like the wrong solution to your problem. You might as well have a cron job running on the web server instead of relying on another server to call it at certain times.
Jeremy Stein
A: 

Many of cloud services can launch only that type of executables which allowed by service terms.To launch .NET that's needed to install some soft for that.

SomeUser
A: 

I'm running .NET executables on the Amazon cloud on Ubuntu on cron jobs. The Mono Project is a port of the .NET framework on Linux. Try installing mono on a linux instance and see if your EXE runs on MONO. If it does than things should be straight forward from there.

Ameer Deen