Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home Internet Call Or Open a web page url by using Windows Task Scheduler or CronJob

Call Or Open a web page url by using Windows Task Scheduler or CronJob

If you need to call a webpage url automatically in every minutes/hours/daily/monthly or a schedule trigger, you can do this by using Task Scheduler in Microsoft Windows or Cronjob in Linux(Unix) system.

This tutorial below will help to setup the scheduled task on both Windows and Linux:

1. Task Scheduler in Windows

  • Write a VBS script, ex: schedule.vbs
  • Schedule the VBS script

Below the schedule.vbs content:

Call LogEntry()
 
Sub LogEntry()
 
        On Error Resume Next
 
        Dim objRequest
        Dim URL
 
        Set objRequest = CreateObject("Microsoft.XMLHTTP")
        URL = "http://www.your_website.com/filename.aspx"
 
        objRequest.open "POST", URL , false
 
        objRequest.Send
 
        Set objRequest = Nothing
 
End Sub

Call LogEntry() Sub LogEntry() On Error Resume Next Dim objRequest Dim URL Set objRequest = CreateObject("Microsoft.XMLHTTP") URL = "http://www.your_website.com/filename.aspx" objRequest.open "POST", URL , false objRequest.Send Set objRequest = Nothing End Sub

Just replace the URL variable by your url you want to call and then setup the Scheduled Tasks to run the VBS script at the time specified.

2. Cronjob in Linux (Unix) system

In Linux, the setting up the schedule task to call a webpage url is much easier than Windows.

Just use the command below when you setup your crontab:

curl -sS http://www.your_website.com/filename.aspx

curl -sS http://www.your_website.com/filename.aspx

Just replace http://www.your_website.com/filename.aspx by your full webpage url and that’s all.

Mar 14, 2011Hoan Huynh
Linux Find Out PHP/ MySQL/ MySQLD/ HTTPD ... Command File LocationGet or Find Facebook Profile Id Number
You Might Also Like:
  • How To Check And Start An Application If It Is Not Running In Windows
  • Auto Delete Old IIS Logs, FTP Logs, SMTP Logs In Windows
  • Schedule Backup And Zip MySQL Database In Windows
  • Facebook Publish To Wall With Popup Or Dialog And Call Back
  • How smartly to run windows software on Linux
  • Create VBScript VBS To Run An EXE File Or Windows Applicaion
  • PHP Get Webpage Content Using cURL
  • How To Check A Port Is Open Or Blocked In Windows
  • Auto Rotate Web Page Title With JavaScript
  • C# Save Web Page URL To Image
Hoan Huynh

Hoan Huynh is the founder and head of 4rapiddev.com. Reach him at [email protected]

10 years ago InternetCreateObject, Cronjob, crontab, Task Scheduler2,057
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
22,237 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
20,087 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
15,872 views
JQuery Allow only numeric characters or only alphabet characters in textbox
13,343 views
C# Read Json From URL And Parse/Deserialize Json
9,851 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • Term Papers – Easy to Take Care of
  • How to Write Term Papers in Online Tutorials
  • How to Plan Writing an Essay
  • How to Apply For a Payday Loan With Bad Credit
  • Statistics For Sale – How To Compose One
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (28)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (123)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development