Results 1 to 5 of 5

Thread: batch file to use in Windows Scheduled Tasks for Email Campaign NOT RUN

  1. #1
    carbonepaolo Guest

    Default batch file to use in Windows Scheduled Tasks for Email Campaign NOT RUN

    Hi Friends!

    I am using SugarCRM Community Edition, Version 6.5.6 (Build 8566)
    My System is: Windows 7 Home Premium Service Pack 1.

    I created a batch file to use in Windows Scheduled Tasks for running Email Campaign.
    The batch file created is following:

    cd C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs
    php.exe -f cron.php

    The first problem I had was following:
    file "php.exe" was only in the directory "C:\Program Files (x86)\sugarcrm-6.5.6\php".
    So, I copied this file in the directory "C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs"

    Then, I run batch file from dos command line, but I had another problem: file "php5ts.dll" was not found.
    So, I copied this file from directory "C:\Program Files (x86)\sugarcrm-6.5.6\php" where it was into directory "C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs".

    Run batch file, I had following warning:
    "fatal error: call to undefined function mysqli_connect() in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\include\database\Mysqli Manager.php on line 278"
    So, I copied file "php.ini" into directory "c:/windows", because I found someone on the web that suggests this.

    Run batch file again, files "LIBEAY32.dll" and "SSLEAY32.dll" not found.
    So, I copied this files into directory "C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs".

    Run batch file, I received warnings you could read at the end of this message.

    Please, could someone help me?

    Many Thanks!
    Bye
    paolo

    ***************Warnings received begin******************************

    C:\Users\romcad\Desktop\Sugar>cd C:\Program Files (x86)\sugarcrm-6.5.6\apps\suga
    rcrm\htdocs

    C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs>php.exe -f cron.php
    PHP Warning: file_put_contents(cache/modules/Schedulers/lastrun): failed to ope
    n stream: Permission denied in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarc
    rm\htdocs\include\SugarQueue\SugarCronJobs.php on line 113
    PHP Warning: session_start(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_tsonh5ic
    nr2njuf2prnpd7rq15, O_RDWR) failed: Permission denied (13) in C:\Program Files (
    x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ SchedulersJob.ph
    p on line 450
    PHP Warning: session_write_close(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_2k
    fq6qq6gi1vlgc9igde6qjce7, O_RDWR) failed: Permission denied (13) in C:\Program F
    iles (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ Schedulers
    Job.php on line 447
    PHP Warning: session_write_close(): Failed to write session data (files). Pleas
    e verify that the current setting of session.save_path is correct (C:/PROGRA~2/S
    UGARC~1.6/php/tmp) in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs
    \modules\SchedulersJobs\SchedulersJob.php on line 447
    PHP Warning: session_start(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_2kfq6qq6
    gi1vlgc9igde6qjce7, O_RDWR) failed: Permission denied (13) in C:\Program Files (
    x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ SchedulersJob.ph
    p on line 450
    PHP Warning: session_write_close(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_3k
    q3mln60vohrpkppbt7f4q105, O_RDWR) failed: Permission denied (13) in C:\Program F
    iles (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ Schedulers
    Job.php on line 447
    PHP Warning: session_write_close(): Failed to write session data (files). Pleas
    e verify that the current setting of session.save_path is correct (C:/PROGRA~2/S
    UGARC~1.6/php/tmp) in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs
    \modules\SchedulersJobs\SchedulersJob.php on line 447
    PHP Warning: session_start(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_3kq3mln6
    0vohrpkppbt7f4q105, O_RDWR) failed: Permission denied (13) in C:\Program Files (
    x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ SchedulersJob.ph
    p on line 450

    C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs>

    ****************************end warning message*************************

  2. #2
    carbonepaolo Guest

    Default Batch file to be used in windows scheduled tasks for email campaign not run

    Hi Friends!

    I am using SugarCRM Community Edition, Version 6.5.6 (Build 8566)
    My System is: Windows 7 Home Premium Service Pack 1.

    I created a batch file to use in Windows Scheduled Tasks for running Email Campaign.
    The batch file created is following:

    cd C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs
    php.exe -f cron.php

    The first problem I had was following:
    file "php.exe" was only in the directory "C:\Program Files (x86)\sugarcrm-6.5.6\php".
    So, I copied this file in the directory "C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs"

    Then, I run batch file from dos command line, but I had another problem: file "php5ts.dll" was not found.
    So, I copied this file from directory "C:\Program Files (x86)\sugarcrm-6.5.6\php" where it was into directory "C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs".

    Run batch file, I had following warning:
    "fatal error: call to undefined function mysqli_connect() in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\include\database\Mysqli Manager.php on line 278"
    So, I copied file "php.ini" into directory "c:/windows", because I found someone on the web that suggests this.

    Run batch file again, files "LIBEAY32.dll" and "SSLEAY32.dll" not found.
    So, I copied this files into directory "C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs".

    Run batch file, I received warnings you could read at the end of this message.

    Please, could someone help me?

    Many Thanks!
    Bye
    paolo

    ***************Warnings received begin******************************

    C:\Users\romcad\Desktop\Sugar>cd C:\Program Files (x86)\sugarcrm-6.5.6\apps\suga
    rcrm\htdocs

    C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs>php.exe -f cron.php
    PHP Warning: file_put_contents(cache/modules/Schedulers/lastrun): failed to ope
    n stream: Permission denied in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarc
    rm\htdocs\include\SugarQueue\SugarCronJobs.php on line 113
    PHP Warning: session_start(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_tsonh5ic
    nr2njuf2prnpd7rq15, O_RDWR) failed: Permission denied (13) in C:\Program Files (
    x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ SchedulersJob.ph
    p on line 450
    PHP Warning: session_write_close(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_2k
    fq6qq6gi1vlgc9igde6qjce7, O_RDWR) failed: Permission denied (13) in C:\Program F
    iles (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ Schedulers
    Job.php on line 447
    PHP Warning: session_write_close(): Failed to write session data (files). Pleas
    e verify that the current setting of session.save_path is correct (C:/PROGRA~2/S
    UGARC~1.6/php/tmp) in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs
    \modules\SchedulersJobs\SchedulersJob.php on line 447
    PHP Warning: session_start(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_2kfq6qq6
    gi1vlgc9igde6qjce7, O_RDWR) failed: Permission denied (13) in C:\Program Files (
    x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ SchedulersJob.ph
    p on line 450
    PHP Warning: session_write_close(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_3k
    q3mln60vohrpkppbt7f4q105, O_RDWR) failed: Permission denied (13) in C:\Program F
    iles (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ Schedulers
    Job.php on line 447
    PHP Warning: session_write_close(): Failed to write session data (files). Pleas
    e verify that the current setting of session.save_path is correct (C:/PROGRA~2/S
    UGARC~1.6/php/tmp) in C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs
    \modules\SchedulersJobs\SchedulersJob.php on line 447
    PHP Warning: session_start(): open(C:/PROGRA~2/SUGARC~1.6/php/tmp\sess_3kq3mln6
    0vohrpkppbt7f4q105, O_RDWR) failed: Permission denied (13) in C:\Program Files (
    x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs\modules\SchedulersJobs\ SchedulersJob.ph
    p on line 450

    C:\Program Files (x86)\sugarcrm-6.5.6\apps\sugarcrm\htdocs>

    ****************************end warning message*************************

  3. #3
    jmertic's Avatar
    jmertic is offline Sugar Community Manager
    Join Date
    Dec 2007
    Posts
    3,996

    Default Re: Batch file to be used in windows scheduled tasks for email campaign not run

    Sounds like permissions problems. Try to run the cron job as the same user as the web server runs as.
    John Mertic
    Sugar Community Manager

  4. #4
    carbonepaolo Guest

    Default Re: Batch file to be used in windows scheduled tasks for email campaign not run

    Quote Originally Posted by jmertic View Post
    Sounds like permissions problems. Try to run the cron job as the same user as the web server runs as.
    Yes, I think so.
    But you consider that I am using a PC standalone, and the user I log in has following permission:

    Read&execute, read, List folder contents

    So, I think cron job is running with these permission. But I don't know with which user the web server runs.
    How can I check user the web server runs?

    Thanks!
    paolo

  5. #5
    carbonepaolo Guest

    Default Re: batch file to use in Windows Scheduled Tasks for Email Campaign NOT RUN

    I'm using pc standalone, so I think web server (apache) runs with same permissions....
    How could I check this?

    Thanks!

    paolo

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2012-11-15, 10:21 AM
  2. Problem in creating and runing a batch file in windows xp
    By sandeep.veon in forum Developer Help
    Replies: 1
    Last Post: 2012-04-12, 09:12 AM
  3. Replies: 52
    Last Post: 2012-03-22, 06:27 PM
  4. Batch file in scheduler
    By atik in forum Developer Help
    Replies: 1
    Last Post: 2009-04-14, 06:14 AM
  5. Replies: 2
    Last Post: 2008-04-07, 05:28 PM

Tags for this Thread

Bookmarks

Posting Permissions

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