Reputation: 21
I am trying to create a scheduled task in GoDaddy windows shared hosting account. I have some logic in my .Net C# class project where I have to call a function on daily basis. I have tried by converting it to an executable(.exe) and configured in godaddy as per
https://in.godaddy.com/help/scheduling-tasks-with-plesk-shared-hosting-8970
But that doesn't work for an .exe.
Eventually I have tried calling that function from an aspx by referencing the class project in the WebApp (because that's what the URL suggests). Now I am blocked with some error which says Exception calling "DownloadString" with "1" argument(s): "URI formats are not supported."
Looks like I am doing something wrong while configuring my aspx.
These are my configuration details:
Path to an executable file:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
-c "(new-object system.net.webclient).downloadstring('http://DOMAIN_NAME.in\SOME_FOLDER\Default.aspx')"
Called up GoDaddy folks to provide a sample, But they said they do not any sample for the same (very irritating).
Can Someone help me with this?
Upvotes: 0
Views: 3221
Reputation: 160
Godaddy already removed task scheduler and they no longer support it since March 2018.
Upvotes: 1
Reputation: 36
you can create a API and call it by
Executable : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Argument : Invoke-RestMethod 'mysite.com/API/MethodName"
The Invoke-RestMethod cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that returns richly structured data.
Upvotes: 0
Reputation: 21
I have found the issue with my configuration, in fact I have just managed to make it work, here it is:
Path to an executable file:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
-c "(new-object system.net.webclient).downloadstring('http://YOUR_DOMAIN.in/Default.aspx')"
Note: Default.aspx must be placed in httpdocs folder (This is the default folder where you place your website related files).
Path to an executable file:
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP54\php-cgi.exe
Arguments:
G:\PleskVhosts\readefy.in\httpdocs\YOUR_SCHEDULED_TASK.php
NOTE: Looks like only these 2 options are available for scheduling your tasks via windows shared hosting.
Upvotes: 0