Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2008
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    important question

    hi everyone.. please i want to know how to create a cron job from a file in php i made this command but it does not get any response. it get the error die message

    i made it in php and i serched online in google and many websites and i did not solve my problem

    my php command is:


    PHP Code:
    exec("crontab -e * * * * * /usr/local/bin/php -f /home/survey/public_html/john/cron/snd2.php") or die ("<br><br>Error in executing Cron file"); 
    so i want to create or use my cron job using javascript.. any help

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,576
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    JavaScript would have *NOTHING* to do with creating a cron job. I'm not even sure why you'd want to create one with PHP, but I suppose that at least might be possible. But JS won't help you.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Along with what OP said, please keep in mind the items listed at http://javascript.about.com/od/reference/a/cannot.htm
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •