Sponsored Content
Full Discussion: Crontab and PHP help
Top Forums Shell Programming and Scripting Crontab and PHP help Post 302383188 by Sidabm on Monday 28th of December 2009 06:12:17 PM
Old 12-28-2009
What happens is it seems to wrote the header and the first few records then stops on cron, but from putty it manages to finish the file and write the closing argument of the xml and echo file created.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab help.

All, I am trying to edit the crontab but I am not able to open it. I just get 863 but nothing opens.I tried crontab -l found some entries. Could some please let me know if I am missing something. I am trying this on my application id. If I do it for my personal Id it works.. Thanks in... (2 Replies)
Discussion started by: venkyA
2 Replies

2. UNIX for Dummies Questions & Answers

Crontab

Hello everyone I´m trying to edit my crontab, with the -e option and the only thing that appears its a number for example crontab -e enter 75 I need to use crontol +d and appears the message that nothing changes in the crontab. If I use crontab -l appears my list of crons. Can... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

3. UNIX for Dummies Questions & Answers

Using PHP script with crontab (NOOB)

Hi, I am trying to use a PHP script as a test for a cron job. My crontab is 1 line: 30 * * * * /home/www/inc/crontab.php if I test the file through the browser (ie. http://www.domain.com/inc/crontab.php), the PHP script works -- so there is nothing wrong with the PHP script itself or the... (5 Replies)
Discussion started by: Bobafart
5 Replies

4. Shell Programming and Scripting

Crontab PHP scripts not ending

when i run the scripts from command line like php ./file.php they run fine and it ends. But i have them running in crontab every 5 minutes and they sometimes dont close. Can i write something to log why or force them to close after a certain amount of time by killing the pid? (2 Replies)
Discussion started by: nitrous
2 Replies

5. UNIX for Advanced & Expert Users

crontab help

I set up a simple echo script so I know its actually doing its job. * * * * * echo hi >> /home/bob/Desktop/come I have 3 video's I'm trying to play as a playlist at 8 am. I've checked in the terminal and as a regular script that this works fine. Right now I'm just trying to get it working so I'm... (7 Replies)
Discussion started by: cokedude
7 Replies

6. Shell Programming and Scripting

help in using crontab

i want to run a script automatic in time there us problem coming while i was doing s simple test i do in command prompt cat > cmdfile 50 17 * * * echo "jtgtrgtrgjtrgg" ctrl+d then crontab cmdfile so this echo command should execute on 17:50 i check in /var/spool/cron/crontabs... (3 Replies)
Discussion started by: sayurabh
3 Replies

7. Shell Programming and Scripting

Need help in crontab

Hi, I want to run a shell script for every 3 hours basis starting from 1 AM in the night. Could you please help me out ,how to set a crontab. 0 01 * * * /shell script Thx. (2 Replies)
Discussion started by: kirankumar
2 Replies

8. Linux

Run a php file using URL in crontab.

I want to run a php file from a url using cron tab. I am using a webhosting and i give a command like that 9 11 9 2 * wget -O /dev/null here-is-domain-name/cronfile.php but it does not work please tell me why this not work. I think this command must run a "cronfile.php" and i do not want to... (2 Replies)
Discussion started by: ArfanHaider
2 Replies

9. UNIX for Advanced & Expert Users

Strange bug crontab command line php / bcompiler

Hello everyone, I have a small problem that I'm stuck for several days and I do not go out. I tell you, I have a php script that I want to run crontab, it uses a compiled bcompiler file. In my php file if(file_exists("php/Alibrary.phb")){ include_once("php/Alibrary.phb"); What I do... (6 Replies)
Discussion started by: nicolas33770
6 Replies
GETOPT(3)								 1								 GETOPT(3)

getopt - Gets options from the command line argument list

SYNOPSIS
array getopt (string $options, [array $longopts]) DESCRIPTION
Parses options passed to the script. PARAMETERS
o $options - Each character in this string will be used as option characters and matched against options passed to the script starting with a single hyphen ( -). For example, an option string "x" recognizes an option -x. Only a-z, A-Z and 0-9 are allowed. o $longopts - An array of options. Each element in this array will be used as option strings and matched against options passed to the script starting with two hyphens ( --). For example, an longopts element "opt" recognizes an option --opt. The $options parameter may contain the following elements: oIndividual characters (do not accept values) oCharacters followed by a colon (parameter requires value) oCharacters followed by two colons (optional value) Option values are the first argument after the string. If a value is required, it does not matter whether the value has leading white space or not. See note. Note Optional values do not accept " " (space) as a separator. Note The format for the $options and $longopts is almost the same, the only difference is that $longopts takes an array of options (where each element is the option) whereas $options takes a string (where each character is the option). RETURN VALUES
This function will return an array of option / argument pairs or FALSE on failure. Note The parsing of options will end at the first non-option found, anything that follows is discarded. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | Added support for "=" as argument/value separa- | | | tor. | | | | | 5.3.0 | | | | | | | Added support for optional values (specified | | | with "::"). | | | | | 5.3.0 | | | | | | | Parameter $longopts is available on all systems. | | | | | 5.3.0 | | | | | | | This function is no longer system dependent, and | | | now works on Windows, too. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 getopt(3) example: The basics <?php // Script example.php $options = getopt("f:hp:"); var_dump($options); ?> shell> php example.php -fvalue -h The above example will output: array(2) { ["f"]=> string(5) "value" ["h"]=> bool(false) } Example #2 getopt(3) example: Introducing long options <?php // Script example.php $shortopts = ""; $shortopts .= "f:"; // Required value $shortopts .= "v::"; // Optional value $shortopts .= "abc"; // These options do not accept values $longopts = array( "required:", // Required value "optional::", // Optional value "option", // No value "opt", // No value ); $options = getopt($shortopts, $longopts); var_dump($options); ?> shell> php example.php -f "value for f" -v -a --required value --optional="optional value" --option The above example will output: array(6) { ["f"]=> string(11) "value for f" ["v"]=> bool(false) ["a"]=> bool(false) ["required"]=> string(5) "value" ["optional"]=> string(14) "optional value" ["option"]=> bool(false) } Example #3 getopt(3) example: Passing multiple options as one <?php // Script example.php $options = getopt("abc"); var_dump($options); ?> shell> php example.php -aaac The above example will output: array(2) { ["a"]=> array(3) { [0]=> bool(false) [1]=> bool(false) [2]=> bool(false) } ["c"]=> bool(false) } SEE ALSO
$argv. PHP Documentation Group GETOPT(3)
All times are GMT -4. The time now is 02:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy