+ Reply to Thread
Results 1 to 10 of 10

Thread: Cron Job with ASP.NET

  1. #1
    sneckelmann is offline x10Hosting Member sneckelmann is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    19

    Cron Job with ASP.NET

    Hello,

    I'm new to cron jobs as a whole. I program in ASP.NET and cannot figure out how to get a job to run.

    Do cron jobs work for ASP.NET?

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Cron Job with ASP.NET

    Doesn't seem that there are that many ASPers here.

    If those who do know it don't get you going, try:

    1. Create an webpage/script that will do what you want when called from the web. Call it cron.aspx
    2. Put it in a password protected directory like 'pwprotecteddir' so nobody will accidentally request it. Make up a username and password for it (do not use the ones you use to log in with etc)
    3. Run a cron job with wget plus authentication:

    Code:
    wget   'http://username:password@yoursitename.com/pwprotecteddir/cron.aspx'
    If the script runs properly when you request it over the web, this should work.

    I just tested it out with a php script.
    Nothing is always absolutely so.

  3. #3
    sneckelmann is offline x10Hosting Member sneckelmann is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    19

    Re: Cron Job with ASP.NET

    [FONT=Courier New]Thank you. I went with your suggestion. The script runs fine over the web, but the cron job reports:

    /home/neckelma/www/cron/Default.aspx: line 1: %@: No such file or directory
    /home/neckelma/www/cron/Default.aspx: line 2:
    : command not found
    /home/neckelma/www/cron/Default.aspx: line 3: !DOCTYPE: No such file or directory
    /home/neckelma/www/cron/Default.aspx: line 4:
    : command not found
    /home/neckelma/www/cron/Default.aspx: line 5: html: No such file or directory
    /home/neckelma/www/cron/Default.aspx: line 6: head: No such file or directory
    /home/neckelma/www/cron/Default.aspx: line 7: syntax error near unexpected token `<'
    /home/neckelma/www/cron/Default.aspx: line 7: ` <title></title>
    '
    That's it!
    Last edited by sneckelmann; 10-04-2009 at 08:28 PM.

  4. #4
    sneckelmann is offline x10Hosting Member sneckelmann is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    19

    Re: Cron Job with ASP.NET

    I got this figured out. For anyone questioning, you have to use "wget" (as suggested) followed by the full page address running the script.

  5. #5
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Cron Job with ASP.NET

    Quote Originally Posted by sneckelmann View Post
    I got this figured out. For anyone questioning, you have to use "wget" (as suggested) followed by the full page address running the script.

    Isn't that what I stated above?
    Nothing is always absolutely so.

  6. #6
    sneckelmann is offline x10Hosting Member sneckelmann is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    19

    Re: Cron Job with ASP.NET

    Yes but I wasn't aware that you meant to use "wget" in the cron job. My mistake.

    Any clue on how to get a script read permission for the mail directory?

  7. #7
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Cron Job with ASP.NET

    Quote Originally Posted by sneckelmann View Post
    Any clue on how to get a script read permission for the mail directory?
    They should have it. At least PHP scripts have no problem.

    The path to your mail dir should be somehthing like:

    '/home/USERNAME/mail/DOMAINNAME.x10hosting.com/EMAILUSERNAME/cur/'
    Last edited by descalzo; 10-06-2009 at 07:48 PM.
    Nothing is always absolutely so.

  8. #8
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Cron Job with ASP.NET

    New email messages are stoked at '/home/USERNAME/mail/DOMAINNAME/EMAILUSERNAME/new/'
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  9. #9
    sneckelmann is offline x10Hosting Member sneckelmann is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    19

    Re: Cron Job with ASP.NET

    Thanks guys.

    I've started another thread at http://forums.x10hosting.com/program...directory.html in order to avoid crossing subjects.
    Last edited by sneckelmann; 10-07-2009 at 03:26 PM.

  10. #10
    katwidme is offline x10Hosting Member katwidme is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    1

    Smile Re: Cron Job with ASP.NET

    I make a cron.php and use wget method but is shows erorr

    i want to call another domain which is hosted on window hosting for schedule job can any one give me solution..

+ Reply to Thread

Similar Threads

  1. How to get ASP.Net to work at x10Hosting
    By Hue Kares in forum Tutorials
    Replies: 56
    Last Post: 11-11-2011, 01:09 PM
  2. Ok, so I'm trying to decided wether to use asp.net or php
    By mrfish in forum Programming Help
    Replies: 8
    Last Post: 06-16-2009, 05:59 AM
  3. Cron job problem still...
    By woodyl in forum Free Hosting
    Replies: 1
    Last Post: 04-16-2009, 02:31 AM
  4. CRON Jobs and PHP
    By deadimp in forum Tutorials
    Replies: 14
    Last Post: 11-27-2008, 05:09 PM
  5. Cron Tutorial (Crontab Tutorial)
    By sunils in forum Tutorials
    Replies: 3
    Last Post: 06-14-2008, 10:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers