?
Solved

Using php & Javascript (Ajax & jQuery) in Cronjobs

Posted on 2011-03-08
4
Medium Priority
?
1,518 Views
Last Modified: 2012-05-11
Hi Experts
I need to run php page using the cronjob on my hosting account
i always do that and is working very well using the command "php5"
but now i need to run a php page which contains some javascript and ajax/jQuery
i can run this page from my browser( Client Side ) and it output and do just what i want but in cronjob it is'nt.

any help will be appreciated.
Thanks.
0
Comment
Question by:mhmr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 35080116
javascript, jQuery, and AJAX need a browser to run in.  In particular, the basis of AJAX, 'XMLHttpRequest', is a browser function, not even a javascript function.
0
 
LVL 2

Author Comment

by:mhmr
ID: 35083078
ok any way to do this
i have an ssh connection in my hosting package  if this doing any good.
so if that possible using a unix command??

Thanks in advance
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 1000 total points
ID: 35083260
0
 
LVL 2

Author Closing Comment

by:mhmr
ID: 35202547
thanks all for the information provided,
i don't have enouph permession to install those programs.
so i'll try another way to run my script, may be i'll switch to php.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question