Is there any way to execute javascript in cron job

Posted on 2012-09-06
Last Modified: 2013-11-13
I am using javascript in my php file. when i execute this file in my browser its working fine. But in cron job its not working. But i want to use javascript that file. Is there any way to execute javascript file in cron job?
Question by:jnj_web_solutions
    1 Comment
    LVL 9

    Accepted Solution

    By very definition, JavaScript is only run client-side. That means that PHP can only output JavaScript via a text string. However, the JavaScript is not going to actually be executed until the output is accessed, externally.

    Is there a particular reason you require javascript? There's nothing I've found that JS can do that PHP can't, and PHP usually does it much better and faster. :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now