Forum Moderators: coopster
The program run smoothly when I called it manually
%absolute_path%/php -m -q -d max_execution_time=1440 -d memory_limit=512M %program_path%/a.php -d week But, it is strange that the program seems to be suspended(terminated) after few mintues it was called.
Why does it terminated when it was triggered by crontab call ONLY?
More info: The program will LOG each action into the log file
Make sure to use all absolute paths within your script that you are using in your cron because it is not running the script from the directory the script is it, so relative paths will not work. If you have any of these anywhere in your script, change them to the full paths and see if that fixes the issue.
Actually, I am using Relative Path, but I have use
ini_set("include_path", ini_get('include_path'). PATH_SEPARATOR .dirname(__FILE__));
require_once ........
and the program can be run in terminal command line with properly:
%absolute_path%/php %program_path%/a.php -d week Is it means that my progam can be run on crontab when my program could be run in command line mode?