Results 1 to 13 of 13

Thread: Scheduled jobs stopped

  1. #1

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16

    Scheduled jobs stopped

    ive contacted support - But just curious. gas anyone else noticed their PHP scheduled jobs have stopped with no explantion.

    no log files, No error messages, No mothing.

    Also the SCHEDULED JOBS LOG on ( https://www.powweb.com/controlpanel/...ref=cpdropdown ) only shows CGi/perl activity

    it does not show PHP activity. the scheduler DOES show the jobs are being run, but im getting ZERO logs of any description & the tasks are not being run..

  2. #2

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16
    Normally my PHP scheduled task is hidden (you cannot access it via a URL).

    i created a test php script to INCLUDE_ONCE my hidden php file & ran it from the URL - everything is working - No errors with the script itself. (i'll remove my test file)

  3. #3

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16
    Ive added a followup in the PHP section. http://forum.powweb.com/showthread.p...cript&p=500700

    Regarding BASH scripts (php)

  4. #4
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    West Virginia
    Posts
    3,450
    Rep Power
    21
    I had written a while ago a PHP script that I once in a while put in the 'task scheduler' to test both. The script itself runs fine and I have entered it again into the 'task scheduler' and it runs fine from there too. I really have nothing to help you with and I apologize for this 'it works for me' type of post.. Good luck.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  5. #5

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16
    Quote Originally Posted by snowmaker View Post
    I had written a while ago a PHP script that I once in a while put in the 'task scheduler' to test both. The script itself runs fine and I have entered it again into the 'task scheduler' and it runs fine from there too. I really have nothing to help you with and I apologize for this 'it works for me' type of post.. Good luck.
    Can you advise the format of how you added it into the scheduler ? (removing / replacing your user ID of course)..

    EDIT:

    Ive got several variants.

    1) in the Command line:

    /home/users/web/ACCOUNT/htdocs/cron/2017a2/cron.php > /home/users/web/ACCOUNT/htdocs/cron/2017a2/crona.log > /home/users/web/ACCOUNT/htdocs/cron/2017a2/cronb.log

    I also *had* /usr/local/bin/php5-cli on the front of it before - when it was going. but during my tests I took it out. now i get errors when adding it back in.

    In & out of the htdocs subfolfders... - my original one not in htdocs...

    2) another version - in the URL part /test.php

    ive also had #1 in a folder outside of my htdocs (ive had it there for years)
    But during testing - now - ive made a copy in a subdirectory of my htdocs..- but idont like having my scheduled tasks visible to the public - if they find it.

    overall, ive got 3-4 variants. MOST give the 'bash' error.. or nothing at all..

  6. #6
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    West Virginia
    Posts
    3,450
    Rep Power
    21
    I chose 'URL to Access:', then entered /filename.php into the next text field, then chose the timeframes from the 'Run this job:' drop downs.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  7. #7
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    West Virginia
    Posts
    3,450
    Rep Power
    21
    That file that I used is in the htdocs directory. I assume anything specified in the 'URL to Access:' section must be in the htdocs directory, but I'll move it above that directory and try to run it from the 'Command to Run:' (with the full pathname specified of course) section and get back to you.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  8. #8

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16
    Quote Originally Posted by snowmaker View Post
    I chose 'URL to Access:', then entered /filename.php into the next text field, then chose the timeframes from the 'Run this job:' drop downs.
    Ive got that too - nothing. i guess i'll need to wait for support to get back to me.

    my error is :- sh: 1: /home/users/web/PATH-USER/htdocs/cron.php: Permission denied

    i did notice that the instructions given to me in the support ticket contradict the knowledge base instructions. ive asked them to double-check & make sure the KB is made more clear. (however i did use the KB & had my cron-job going for years - something that i didnt do/touch - stopped it.. )

    Off to bed - hopefully in weekend it will be fixed...

    EDIT: when i run the script via URL - it works fine. if i wait for the scheduled task - i get the SH / bash error

  9. #9
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    West Virginia
    Posts
    3,450
    Rep Power
    21
    Perhaps a PHP script cannot be run from the 'Command to Run:' section, either at all or when it is above the htdocs directory. I have had no luck running the same script that is in the htdocs directory with the 'URL to Access:' option selected. The 'Last Run' column get updated when it should, no error is is in the error log, but the script doesn't do what it should. I'm at a loss here except to only use the 'URL to Access:' option when I need to. Good luck again with your support request.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  10. #10
    Rick
    Join Date
    May 2002
    Location
    Minneapolis, MN
    Posts
    1,753
    Rep Power
    19
    Quote Originally Posted by PeterPan View Post
    Ive got that too - nothing. i guess i'll need to wait for support to get back to me.

    my error is :- sh: 1: /home/users/web/PATH-USER/htdocs/cron.php: Permission denied

    EDIT: when i run the script via URL - it works fine. if i wait for the scheduled task - i get the SH / bash error
    2 shots in the dark....

    First, go into the File Manager or use an FTP tool to insure that script file's permissions are set to 0x755. It's a longshot, but its not unheard of for files to have their permissions changed during system changes/outages. Since you're getting a "Permission denied" error, it seems a reasonable idea to check.

    Second, replace the file path in the Cron Manager to the actual URL for the script (ie. 'http://yoursite.com/cron.php'). I dunno if this is even a legal instruction, but it does obviate any chance that the script isn't being run through the PHP interpreter.
    Rick Trethewey

  11. #11
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    West Virginia
    Posts
    3,450
    Rep Power
    21
    The PHP script that I can run either manually or by the Task Scheduler has permissions set to 600. 755 will work just fine too, but setting it that high isn't really necessary..
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  12. #12

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16
    Ive used 600, 755 & 0x755 (what does the 0x do ?) - no effect, the error reported is the same.

    Ive changed the php script back to regular 755. i'll wait for support to fix it - Hopefully soon.........

  13. #13

    Join Date
    Sep 2002
    Location
    Auckland
    Posts
    1,356
    Rep Power
    16
    Anyone else with this prob ?

Posting Permissions

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