Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script should check and run only on Sunday Post 302906894 by wisecracker on Tuesday 24th of June 2014 09:16:25 AM
Old 06-24-2014
Hi nanz143...

I am with Don here...

I have no idea how you changed my code and got it to work, plus, you now have a totally different requirement to your OP.

So you are saying that Sunday is no longer a requirement?

So EXACTLY what is the requirement now?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check in unix shell script so that no one is able to run the script manually

I want to create an automated script which is called by another maually executed script. The condition is that the no one should be able to manually execute the automated script. The automated script can be on the same machine or it can be on a remote machine. Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies

2. Solaris

How to check for Saturday or Sunday

Hi , I have a date parameter passed in YYYYMMDD format , how can I check whether it is Sat or Sun on Solaris box , as we can do the same easily on linux box by using date -d YYYYMMDD '+a' . Any pointres will be really helpful . (5 Replies)
Discussion started by: harpreetanand
5 Replies

3. Shell Programming and Scripting

Check if script run by a user directly or via other scripts

Hi, i have a script 'a.sh' that should be called only by certain scripts like b.sh, c.sh Inside a.sh, how can i determine 1) if this script was run directly from command prompt (or scheduler) 2) if called via other scripts? Is there an easy way to get parent process name (not just pid),... (2 Replies)
Discussion started by: ysrinu
2 Replies

4. Shell Programming and Scripting

Crontab job to run every sunday

Hello, I wanted to run one of my shell script for every sunday at 5PM. Here is the crontab entry i am using.. 00 17 * * 0 /inventory/update.sh > /inventory/update.log 2>&1 The job is not kicking on sunday at the specified time.. Am i missing anthing? Any help is appreciated... (2 Replies)
Discussion started by: govindts
2 Replies

5. Shell Programming and Scripting

perl script to check if empty files are created and delete them and run a shell script

I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies

6. UNIX for Dummies Questions & Answers

Run script on every second sunday

I was to schedule a script in a crontab after every 15 days specically on every 2nd Sunday. I know that i can schedule on basis of weekdays, but can it be done by skipping in between???:wall: (5 Replies)
Discussion started by: masquerer
5 Replies

7. UNIX for Advanced & Expert Users

Autosys job run on Sunday

Hi, I need to create a autosys job which will run on every sunday at 7:30 AM NY time for each 10 min interval of time. days_of_week: su start_mins: 0,10,20,30,40,50 run_window:"07:30" Is it fine? Please help Thanks, Anup (2 Replies)
Discussion started by: anupdas
2 Replies

8. Shell Programming and Scripting

Script to run php and check value in txt

Hello, I'm looking for a bash script, that I will run from cron, that executes a php script. After 5 minutes that the php script is executed, the bash script, must check a value in a text file /public_html/check.txt if check.txt = 0 the script will stop, if check.txt is not = 0 it must... (0 Replies)
Discussion started by: andymc1
0 Replies

9. Shell Programming and Scripting

How to check if script is run via cron or manual=command line?

Hi all, I have a script that can be run via cron or via the command line. Is there any way that I can place something on the script to be able to distinguish/differentiate whether the script was run via a user in the command line or whether it was run from the cron? (3 Replies)
Discussion started by: newbie_01
3 Replies

10. Shell Programming and Scripting

Run script on every last sunday of the month

Hi ALL, I have been testing this script to run for every last Sunday of the month,looks like month which have 5 sunday (july 2016 )is not passing this and failing every time. Here is what I am using, current_date=31 echo " CURRENT DAY -> $current_date" if ... (2 Replies)
Discussion started by: netdbaind
2 Replies
SPCTL(8)						    BSD System Manager's Manual 						  SPCTL(8)

NAME
spctl -- SecAssessment system policy security SYNOPSIS
spctl --assess [-t type] [-] file ... spctl --master-enable | --master-disable spctl --enable | --disable | --remove [-t type] [--path path] [--requirement requirement] [--anchor hash] [--hash hash] spctl --status DESCRIPTION
spctl manages the security assessment policy subsystem. This subsystem maintains and evaluates rules that determine whether the system allows the installation, execution, and other operations on files on the system. spctl requires one command option that determines its principal operation: --add Add rule(s) to the system-wide assessment rule database. -a, --assess Requests that spctl perform an assessment on the files given. --disable Disable one or more rules in the assessment rule database. Disabled rules are not considered when performing assessment, but remain in the database and can be re-enabled later. --enable Enable rule(s) in the assessment rule database, counteracting earlier disabling. --disable --master-disable Disable the assessment subsystem altogether. Operations that would be denied by system policy will be allowed to proceed; assess- ment APIs always report success. Requires root access. --master-enable Enable the assessment subsystem. Operations that are denied by system policy will fail; assessment APIs report the truth. Requires root access. --remove Remove rule(s) from the assessment rule database. --status Query whether the assessment subsystem is enabled or disabled. In addition, the following options are recognized: --anchor In rule update operations, indicates that the arguments are hashes of anchor certificates. --continue If the assessment of a file fails, continue assessing additional file arguments. Without this option, the first failed assessment terminates operation. --hash In rule update operations, indicates that the arguments are code directory hashes. --ignore-cache Do not query or use the assessment object cache. This may significantly slow down operation. Newly generated assessments may still be stored in the cache. --label label Specifies a string label to attach to new rules, or find in existing rules. Labels are arbitrary strings that are assigned by con- vention. Rule labels are optional. --no-cache Do not place the outcome of any assessments into the assessment object cache. No other assessment may reuse this outcome. This option not prohibit the use of existing cache entries. --path In rule update operations, indicates that the argument(s) denote paths to files on disk. --priority priority In rule update operations, specifies the priority of the rule(s) created or changed. Priorities are floating-point numbers. Higher numeric values indicate higher priority. --raw When displaying the outcome of an assessment, write it as a "raw" XML plist instead of parsing it in somewhat more friendly form. This is useful when used in scripts, or to access newly invented assessment aspects that spctl does not yet know about. --requirement In rule update operations, indicates that the argument(s) are code requirement source. --reset-default Unconditionally reset the system policy database to its default value. This discards all changes made by administrators. It also heals any corruption to the database. It does not implicitly either enable or disable the facility. This must be done as the super user. Reboot after use. --rule In rule update operations, indicates that the argument(s) are the index numbers of existing rules. -t, --type Specify which type of assessment is desired: execute to assess code execution, install to assess installation of an installer pack- age, and open to assess the opening of documents. The default is to assess execution. -v, --verbose Requests more verbose output. Repeat the option or give it a higher numeric value to increase verbosity. RULE SUBJECTS
The system assessement rule database contains entries that match candidates based on Code Requirements. spctl allows you to specify these requirements directly using the --requirement option. In addition, individual programs on disk can be addressed with the --path option (which uses their Designated Requirement). The --anchor option takes the hash of a (full) certificate and turns it into a requirement match- ing any signature based on that anchor certificate. Alternatively, it can take the absolute path of a certificate file on disk, containing the DER form of an anchor certificate. Finally, the --hash option generates a code requirement that denotes only and exactly one program whose CodeDirectory hash is given. The means of specifying subjects does not affect the remaining processing. FILES
/var/db/SystemPolicy The system policy database. /var/db/.SystemPolicy-default A copy of the initial distribution version of the system policy database. Useful for starting over if the database gets messed up beyond recognition. EXAMPLES
To check whether Mail.app is allowed to run on the local system: spctl -a /Applications/Mail.app To allow Frobozz.app to run on the local system: spctl --add --label "My Stuff" /Applications/Frobozz.app To forbid all code obtained from the Mac App Store from running: spctl --disable --label "Mac App Store" DIAGNOSTICS
spctl exits zero on success, or one if an operation has failed. Exit code two indicates unrecognized or unsuitable arguments. If an assess- ment operation results in denial but no other problem has occurred, the exit code is three. SEE ALSO
codesign(1), syspolicyd(1) HISTORY
The system policy facility and spctl command first appeared in Mac OS X Lion 10.7.3 as a limited developer preview. BSD
January 19, 2012 BSD
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy