I have a Siebel CRM, I have a set of actions that I perform daily. Is it possible to automate this? I want this is to be done from the user side. What's the easiest way to achieve this?
E.g I want the program to change the follow-up dates. So this would include changing the date and clicking done.
Screen Capture
You didn't mention which Siebel version you're running, but from IP17 onwards there's a new feature called Siebel Test Automation. Perhaps you could record a test scenario and schedule it to run in a daily basis.
https://docs.oracle.com/cd/E14004_01/books/TestGuide/TestGuide_AutoFuncTest6.html
Another option would be to have a python script to instantiate a browser session and redo your required steps, try to google about python and selenium library (it's free).
I have some users in my web site that have a task with a deadline. I want to email them when their deadline is finish. but this action must be perform automatically. Is there any way to make something like that? should i use global in asp, or there is a better way?
You really should write either a scheduled task or a Windows service to perform that sort of action. An ASP.NET website will happily go to sleep if there are no requests, and you really don't want to have long running threads on a web server.
(There is a 'trick' using cache expiration to get scheduled callbacks to your code, try it if you can't use the options below.)
Write an endpoint (URL like /CheckTaskDeadline.ashx) that when called will check for task deadlines and trigger an action (send email). Add a scheduled task that makes a request for the endpoint every 5 minutes, or every hour (whatever granularity you need for reliably triggering close to the deadline). Use curl or wget to 'ping' the URL.
If you don't have access to the machine, sometimes you can create scheduled tasks using your webhost's configuration panel. If you don't, ask them nicely :-). A good hosting service provider should be able to help you. Otherwise, consider moving the application to another host, or get a separate 'ping' service, like Pingdom.
I have a function that needs to be executed every day at an exact hour. How can i do that in asp.net? Do i need to use a webService or do i need to install something on the server or something else? How can this be made?
You can use a Scheduled Task to execute a C# console app.
http://support.microsoft.com/kb/308569
There are a variety of options, you could use:
Windows Workflow Foundation that executes at a certain time (probably overkill for you)
SQL Agent (probably best suited for SQL esc jobs)
Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals
Scheduled Tasks in ASP.NET Web Applications using Timers
ASPNET is a Request-driven model. It gets a request, for a document, a resource, a page... and then it runs some logic to generate that document, logic or page and transmit it to the requester. It's not set up to "run" by itself.
So you have a couple options:
The way to get something to run at a particular time on Windows is via Task Scheduler. It's available on any recent Windows. You supply the EXE. In your case it might make sense to write a console EXE.
Use schtasks.exe (command line tool) or the control-panel applet to to set up the task, the login, the time and repeats.
The EXE could be an ASPNET client that makes a request to an ASPNET-managed resource. Or it could just directly do the thing you want - maybe it's reading a database and creating a report.
Is there a way in ASP.NET C# to raise a event on a given time daily to run a procedure and send emails to list of users with their sale report?
In a way, I want to keep a thread active in background in app_start event in global file.
I am on share hosting so don't have much power to update any setting on server as per my needs.
Why don't you build an application that send those emails and run it in a specific time using Windows Tasks Scheduler instead of keeping your application running all the time?
This way, after your application sends the emails and accomplish its task, you could simply end it and start it again whenever you need.
Have a look at this ASP.Net:Best way to run scheduled tasks
Use System.Timers.Timer and do what you need in the callback.
I'm running .NET on a windows box and I would like to have a function run every night at midnight. Of course since HTTP stateless and Windows doesn't have a "cron job" type function (that I know of), I will either have to visit my site myself every night at midnight or just wait for a user to visit the site to rely on it being updated.
Is there an alternative to this that I can create where something will automatically run at a certain time?
I'm pretty sure that Windows' task scheduler can do most things that cron can do. But I might be missing something.
Edit: Reached at Settings -> Control Panel -> Scheduled Tasks
If none of the other answers work for you, here's an option:
There are a bunch of server monitoring services out there that will make an http call to your site at regular intervals (every minute if you like). You can get 5 minute intervals for free on some of them.
Create a password protected page, that performs your function (if it hasn't been done yet today) and point that service at it.
At least this way you won't have to write anything additional, and you can rest easy knowing it doesn't rely on your home machine.
Jeff Attwood at some point in the podcast mentioned a dirty hack to use the Cache Expiration Callback to fake this.
He'd insert an item in .Net's Cache, with an expiration set to 2 hours, and a callback to get called once the item expired, and that was his cron.
I think this was the article:
http://www.codeproject.com/KB/aspnet/ASPNETService.aspx?display=Print
It sucks if you ask me, but for a shared hosting solution, I can't think of anything much better.
Also, there are external cron services that you give a URL to and they will "ping" it regularly, like: (these are not free)
http://webcron.org/
http://www.webbasedcron.com/
Here's a starting point to programmatically add/delete and manage tasks in the Task Scheduler.
http://www.codeproject.com/KB/system/taskscheduler.aspx
If you have command-line access you could try the "at" command, which is like an ultra-light cron:
http://support.microsoft.com/kb/313565
you can also take a look at Quartz .Net http://quartznet.sourceforge.net/ which is a scheduler
The windows equivalent of cron is At. If you have access to the machine.
Use the Timer class to create a timer that periodically calls a method to be executed.
A static timer can be started in the Application_Start event in the Global class. Because the timer uses an interval rather than an absolute time, you'll have to calculate the time interval until midnight and set the Interval property accordingly.
It looks like GoDaddy has provisions for this, but There Is More Than One Way To Do It:
When you install Drupal it needs you to set up a cron job, and I've found out that the project members have documented this step throughly. Go to http://drupal.org/cron for more information, and remember to read http://drupal.org/node/31506 for specific Windows information.
If everything else fails, google for "web cron job" and use a commercial "cron job" service. Choose carefully, don't get ripped off.
I'm also facing the same issue. I want to run ASP.NET with MSSQL at GoDaddy. But they don't have scheule task for windows hosting. After reading the post, I did my own google and found this free web cron job scheduler:
I just tried and it works perfectly...well almost. The job expires in 1 year.
http://www.setcronjob.com/
Hope it helps.
Searching for an answer to the same question, I found this post (quartz-net-with-asp-net) with setup instruction for Quartz.NET ("Enterprise Job Scheduler for .NET Platform", from their website) even from inside an ASP.NET application.
Added it here mainly for reference.
Why not install cygwin and use cron itself?
here is a pdf guide on setting it up:
http://csc.csudh.edu/kleyba/cygwin-cron.pdf