Sponsored Content
Full Discussion: Create cron job without root
Top Forums UNIX for Dummies Questions & Answers Create cron job without root Post 302920438 by Corona688 on Thursday 9th of October 2014 11:40:02 AM
Old 10-09-2014
vi-hater's cheat sheet for vi:
  • i: Stop beeping at me and enter writing mode you stupid program
  • esc-:-w-q-enter: Save and quit
  • esc-:-q-!-enter: Quit without saving
  • esc-d-d: Delete a line because backspace isn't good enough for you
  • esc-esc-esc: what in the world are you doing now, quit it, stop doing that

They told me I would come to love vi as I learned to use it. That of course never happened. Knowing the basics is still useful.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cron Sends mail to root on completion of job.

All I am running a few scripts through a cron job. This is for checking some key services that are running on by box. The problem is, everytime the cron runs, it sends a mail to the root account. The root account mails need to cleared every now and then. Is there some way I can stop these... (1 Reply)
Discussion started by: skotapal
1 Replies

2. Shell Programming and Scripting

How to create cron job automatically?

How do I write a perl script to get the cron jobs? I could do a perl -e ' system "crontab -l > jobs.txt " '; Is there a better way? Then I can use perl to make changes to jobs.txt. How can I submit the changes. I suppose I could use system "crontab jobs.txt", is there a better way? ... (0 Replies)
Discussion started by: siegfried
0 Replies

3. HP-UX

How to create a cron job and run in quality system

Hi Experts, I'm a SAP Basis, I have a small doubt would request you please help on this... 1. I wold like to copy files from one system to another system? as per my knowledge "we have to mount the prod filesystem on the quality box and do a copy every day thru crontab script, or do it via... (2 Replies)
Discussion started by: mahantysk
2 Replies

4. Shell Programming and Scripting

create a chmod cron job help please

hi all, I'm so embarrasingly new; apologies. So here's my dilemma; files are being uploaded to the server via a php script... this is therefore assigning ownership to 'nobody' rather than the account 'user'. It's screwing with the permissions and then the owner can't ftp download images... (2 Replies)
Discussion started by: sirj
2 Replies

5. Shell Programming and Scripting

Re : How to create this cron job?

Hello All, Hope this finds you well. I am creating this shell script that will create cron jobs in crontab file. What I am provided with is the start time , intervals and # of trials. Based of Start time ( say 7:15 am ) and interval being 15 minutes, # of trial being 5 , I should create cron... (5 Replies)
Discussion started by: samshaw
5 Replies

6. Shell Programming and Scripting

Im trying to create a FTP Cron Job

Hello, Im fairly new to this and am hoping for your help in moving forward. 1. I need to carry out a FTP transfer from SERVER1 to SERVER2 at 3am every morning. 2. The FTP is to work on SERVER1 3. There will be many files to transfer (96 files per day) 4. I want to delete the files... (3 Replies)
Discussion started by: nozerf
3 Replies

7. Shell Programming and Scripting

Adding a new root cron job

Hi there, I have over 2000 systems (mainly Solaris) and I want to write a script that inserts a new root cronjob on each of those servers. obviously just adding a line to /var/spool/cron/crontabs/root looks like the easiest way, but i really dont want to have to send a HUP to crond on all boxes ... (3 Replies)
Discussion started by: rethink
3 Replies

8. Shell Programming and Scripting

Cron job initiating ssh AND sudo (from user, not root)

I've been bashing my head on the desk for 2 days trying to get this to work, but I've had no luck. I'll try to be as clear as possible in my explanation without dragging out the details. I'm trying to set up a cron job for user "john" which runs a script. This script initiates an ssh connection to... (5 Replies)
Discussion started by: eh3civic
5 Replies

9. UNIX for Dummies Questions & Answers

Need help to create cron job

Dear Experts, I want to create cronjob with the following steps: 1. go to directory /home/logs/ $cd /home/logs/ 2. copy to /tmp/ the most recent file with "prefix" local_data_ and sufix ".gz" ls -ltr drwxr-xr- 4096 Nov 24 2009 bak drwxr-xr-x 24096 Aug... (6 Replies)
Discussion started by: maxsub
6 Replies

10. Shell Programming and Scripting

CRON JOB not running - for tape backup from root user

I am trying a cron on root user to backup to tape using TAR command here is the cron entry 11 08 * * 6 /erdhot1cron 2>&1 >> /test3/scripts/dba/erdhot1cron.log here is script inside - edhot1cron #!/bin/bash vsysdt=`date +%d%m%y` date tar -cvf /dev/st0... (4 Replies)
Discussion started by: vijaymec50
4 Replies
Perl::Critic::Policy::RegularExpressions::ProhibitCompleUsereContributed Perl DPerl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes(3)

NAME
Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes - Split long regexps into smaller "qr//" chunks. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Big regexps are hard to read, perhaps even the hardest part of Perl. A good practice to write digestible chunks of regexp and put them together. This policy flags any regexp that is longer than "N" characters, where "N" is a configurable value that defaults to 60. If the regexp uses the "x" flag, then the length is computed after parsing out any comments or whitespace. Unfortunately the use of descriptive (and therefore longish) variable names can cause regexps to be in violation of this policy, so interpolated variables are counted as 4 characters no matter how long their names actually are. CASE STUDY
As an example, look at the regexp used to match email addresses in Email::Valid::Loose (tweaked lightly to wrap for POD) (?x-ism:(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@,;:".\[] 00-37x80-xff])|"[^\x80-xff 15"]*(?:\[^x80-xff][^\x80-xff 15 "]*)*")(?:(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@,;:".\[ ]00-37x80-xff])|"[^\x80-xff 15"]*(?:\[^x80-xff][^\x80-xff 15"]*)*")|.)*@(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@, ;:".\[]00-37x80-xff])|[(?:[^\x80-xff 15[]]|\[^x80-xff])*] )(?:.(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@,;:".\[]00 -37x80-xff])|[(?:[^\x80-xff 15[]]|\[^x80-xff])*]))*) which is constructed from the following code: my $esc = '\\'; my $period = '.'; my $space = '40'; my $open_br = '['; my $close_br = ']'; my $nonASCII = 'x80-xff'; my $ctrl = '00-37'; my $cr_list = ' 15'; my $qtext = qq/[^$esc$nonASCII$cr_list"]/; # " my $dtext = qq/[^$esc$nonASCII$cr_list$open_br$close_br]/; my $quoted_pair = qq<$esc>.qq<[^$nonASCII]>; my $atom_char = qq/[^($space)<>@,;:".$esc$open_br$close_br$ctrl$nonASCII]/;# " my $atom = qq<$atom_char+(?!$atom_char)>; my $quoted_str = qq<"$qtext*(?:$quoted_pair$qtext*)*">; # " my $word = qq<(?:$atom|$quoted_str)>; my $domain_ref = $atom; my $domain_lit = qq<$open_br(?:$dtext|$quoted_pair)*$close_br>; my $sub_domain = qq<(?:$domain_ref|$domain_lit)>; my $domain = qq<$sub_domain(?:$period$sub_domain)*>; my $local_part = qq<$word(?:$word|$period)*>; # This part is modified $Addr_spec_re = qr<$local_part@$domain>; If you read the code from bottom to top, it is quite readable. And, you can even see the one violation of RFC822 that Tatsuhiko Miyagawa deliberately put into Email::Valid::Loose to allow periods. Look for the "|." in the upper regexp to see that same deviation. One could certainly argue that the top regexp could be re-written more legibly with "m//x" and comments. But the bottom version is self- documenting and, for example, doesn't repeat "x80-xff" 18 times. Furthermore, it's much easier to compare the second version against the source BNF grammar in RFC 822 to judge whether the implementation is sound even before running tests. CONFIGURATION
This policy allows regexps up to "N" characters long, where "N" defaults to 60. You can override this to set it to a different number with the "max_characters" setting. To do this, put entries in a .perlcriticrc file like this: [RegularExpressions::ProhibitComplexRegexes] max_characters = 40 CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation. AUTHOR
Chris Dolan <cdolan@cpan.org> COPYRIGHT
Copyright (c) 2007-2011 Chris Dolan. Many rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module perl v5.16.3 2014-06-09 Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes(3)
All times are GMT -4. The time now is 11:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy