Recently did a clean install of El Capitan on some student computers. Previously running Yosemite.
I have a cron job set to run a perl script which deletes user accounts. This same cronjob which previously ran in Yosemite (so did the script), is not running in El Capitan. This cronjob and script are on all the computers locally.
Details:
Cron
50 03 * * 1,2,3,4,5,6,7 /var/root/homeDelete.pl
Script
#!/usr/bin/perl
$DEBUG = 0;
$homeDir = "/Users";
@ignores = (".","..",".DS_Store",".localized","Guest","Shared","macadmin","profile","root","Lab");
opendir (DIR, $homeDir) or die $!;
while (readdir(DIR)){
$delete = 0;
foreach $ignore (@ignores){
if ($_ eq $ignore){
$delete = 1;
}
}
if (!$delete){
$fullPathToDelete = "$homeDir/$_";
if($DEBUG){
print "`/bin/rm -Rf $fullPathToDelete`
";
}
else{
`/bin/rm -Rf $fullPathToDelete`;;
Could SIP be the reason my script and/or cron are not running? I'm at a loss why it isn't running each morning.